blob: 57288a6272cf596eef0bc22708c1674ee6251108 [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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.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">
Bu Sun Kim65020912020-05-20 12:08:20 -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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<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>
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<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>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<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>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Deletes selected per-instance configs for the managed instance group.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<p class="toc_element">
102 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<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 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<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 -0700107<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700108 <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 -0700109<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <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 -0700112<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113<p class="toc_element">
114 <code><a href="#listErrors_next">listErrors_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700117 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
118<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 -0700119<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400120 <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
121<p class="firstline">Retrieves the next page of results.</p>
122<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 <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 -0700124<p class="firstline">Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125<p class="toc_element">
126 <code><a href="#listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</a></code></p>
127<p class="firstline">Retrieves the next page of results.</p>
128<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133<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>
134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
136<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139<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 -0700140<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400141 <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142<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>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145<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>
146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148<p class="firstline">Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700151<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>
152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154<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>
155<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#update">update(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400160<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
163<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 -0700164<h3>Method Details</h3>
165<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700166 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 <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 -0700168
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400169If 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.
170
171You can specify a maximum of 1000 instances with this method per request.
172
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700173Args:
174 project: string, Project ID for this request. (required)
175 zone: string, The name of the zone where the managed instance group is located. (required)
176 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700178 The object takes the form of:
179
180{
Bu Sun Kim65020912020-05-20 12:08:20 -0700181 &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].
182 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700183 ],
184 }
185
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 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.
187
188For 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.
189
190The 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 -0700191
192Returns:
193 An object of the form:
194
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 { # Represents an Operation resource.
196 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700197 # Google Compute Engine has three Operation resources:
198 #
199 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
200 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
202 #
203 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 # - For global operations, use the `globalOperations` resource.
205 # - For regional operations, use the `regionOperations` resource.
206 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 # 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 -0700209 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
210 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
211 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
212 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
213 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
214 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700215 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
217 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
218 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700219 },
220 ],
221 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 &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`.
223 &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.
224 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
225 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
226 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
227 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
228 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
229 &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.
230 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
231 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
232 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
233 &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.
234 &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`.
235 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
236 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
237 &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.
238 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
239 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
240 {
241 &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.
242 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
243 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
244 {
245 &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).
246 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
247 },
248 ],
249 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
250 },
251 ],
252 &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 -0700253 }</pre>
254</div>
255
256<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 <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 -0700258 <pre>Retrieves the list of managed instance groups and groups them by zone.
259
260Args:
261 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700262 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 -0700263
Dan O'Mearadd494642020-05-01 07:42:23 -0700264For 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 -0700265
Dan O'Mearadd494642020-05-01 07:42:23 -0700266You 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 -0700267
Bu Sun Kim65020912020-05-20 12:08:20 -0700268To 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 -0700269 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 -0700270 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`)
271 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
272
273You 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.
274
275Currently, only sorting by `name` or `creationTimestamp desc` is supported.
276 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.
277 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 -0700278
279Returns:
280 An object of the form:
281
282 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
284 &quot;items&quot;: { # A list of InstanceGroupManagersScopedList resources.
285 &quot;a_key&quot;: { # [Output Only] The name of the scope that contains this set of managed instance groups.
286 &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 -0700287 { # Represents a Managed Instance Group resource.
288 #
289 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
290 #
291 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
292 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 # 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 -0700294 &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 -0700295 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
297 &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].
298 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When &#x27;percent&#x27; is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance&#x27;s status is RUNNING. 2. Instance&#x27;s currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 #
300 # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 #
303 #
304 # - If the value is fixed, then the calculated value is equal to the fixed value.
305 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
307 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 },
309 },
310 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 &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.
312 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
313 &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.
314 &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.
315 &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 -0700316 #
317 # 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 -0700318 &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.
319 &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.
320 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
321 &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.
322 &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.
323 &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.
324 &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 -0700325 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
327 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
328 &quot;targetShape&quot;: &quot;A String&quot;, # The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). The possible values are EVEN and ANY. For EVEN the group attempts to preserve a balanced number of instances across zones. For ANY the group creates new instances where resources are available to fulfill the request; as a result, instances may be distributed unevenly across zones in this mode. The default value is EVEN.
329 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800330 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800332 },
333 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700335 &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.
336 &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.
337 #
338 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
339 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
340 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
341 &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.
342 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
343 &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.
344 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
345 { # The named port. For example: .
346 &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.
347 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
348 },
349 ],
350 &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.
351 &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.
352 &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.
353 &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.
354 &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.
355 },
356 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
357 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
358 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
359 &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.
360 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
361 &quot;preservedState&quot;: { # Configuration of preserved resources.
362 &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.
363 &quot;a_key&quot;: {
364 &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 -0700365 },
366 },
367 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700368 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
370 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
371 &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.
372 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
373 &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.
374 &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 -0700375 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
376 &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.
377 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 },
379 &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.
380 &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.
381 },
382 },
383 &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.
384 &quot;A String&quot;,
385 ],
386 &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.
387 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
388 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
389 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
390 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
391 &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.
392 #
393 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
394 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
395 #
396 #
397 # - If the value is fixed, then the calculated value is equal to the fixed value.
398 # - 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.
399 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
400 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
401 },
402 &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:
403 #
404 #
405 # - The instance&#x27;s status is RUNNING.
406 # - 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.
407 #
408 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
409 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
410 #
411 #
412 # - If the value is fixed, then the calculated value is equal to the fixed value.
413 # - 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.
414 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
415 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
416 },
417 &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].
418 &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.
419 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
420 &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).
421 },
422 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
423 #
424 # 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.
425 {
426 &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.
427 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
428 &quot;tag&quot;: &quot;A String&quot;, # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of &#x27;name&#x27;.
429 &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:
430 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
431 # - 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.
432 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
433 #
434 #
435 # - If the value is fixed, then the calculated value is equal to the fixed value.
436 # - 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.
437 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
438 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
439 },
440 },
441 ],
442 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700444 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700445 &quot;warning&quot;: { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
446 &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.
447 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
448 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
449 {
450 &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).
451 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
452 },
453 ],
454 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
455 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700456 },
457 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 &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.
459 &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.
460 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
461 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
462 &quot;A String&quot;,
463 ],
464 &quot;warning&quot;: { # [Output Only] Informational warning message.
465 &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.
466 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
467 # &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 -0700468 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 &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).
470 &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 -0700471 },
472 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 &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 -0700474 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700475 }</pre>
476</div>
477
478<div class="method">
479 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
480 <pre>Retrieves the next page of results.
481
482Args:
483 previous_request: The request for the previous page. (required)
484 previous_response: The response from the request for the previous page. (required)
485
486Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700487 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700488 page. Returns None if there are no more items in the collection.
489 </pre>
490</div>
491
492<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700493 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</code>
494 <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 -0700495
496Args:
497 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
499 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501 The object takes the form of:
502
503{ # InstanceGroupManagers.applyUpdatesToInstances
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700504 &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 -0700505 &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].
506 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 &quot;maximalAction&quot;: &quot;A String&quot;, # The maximal action that should be performed on the instances. By default REPLACE. This field is deprecated, please use most_disruptive_allowed_action.
509 &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 -0700510 # - REPLACE: At minimum, delete the instance and create it again.
511 # - RESTART: Stop the instance and start it again.
512 # - REFRESH: Do not stop the instance.
513 # - 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 -0700514 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # The most disruptive action that you want to perform on each instance during the update:
515 # - REPLACE: Delete the instance and create it again.
516 # - RESTART: Stop the instance and start it again.
517 # - REFRESH: Do not stop the instance.
518 # - 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 -0700519 }
520
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700521
522Returns:
523 An object of the form:
524
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 { # Represents an Operation resource.
526 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700527 # Google Compute Engine has three Operation resources:
528 #
529 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
530 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
532 #
533 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700534 # - For global operations, use the `globalOperations` resource.
535 # - For regional operations, use the `regionOperations` resource.
536 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700538 # 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 -0700539 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
540 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
541 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
542 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
543 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
544 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
547 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
548 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 },
550 ],
551 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &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`.
553 &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.
554 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
555 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
556 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
557 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
558 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
559 &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.
560 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
561 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
562 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
563 &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.
564 &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`.
565 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
566 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
567 &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.
568 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
569 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
570 {
571 &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.
572 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
573 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
574 {
575 &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).
576 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
577 },
578 ],
579 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
580 },
581 ],
582 &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 -0700583 }</pre>
584</div>
585
586<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700588 <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.
589
590Args:
591 project: string, Project ID for this request. (required)
592 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
593 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 The object takes the form of:
596
597{ # InstanceGroupManagers.createInstances
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 &quot;instances&quot;: [ # [Required] List of specifications of per-instance configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700599 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700600 &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.
601 &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.
602 &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.
603 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
604 &quot;a_key&quot;: {
605 &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.
606 &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.
607 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 },
609 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
611 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 },
613 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700614 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700615 },
616 ],
617 }
618
619 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.
620
621For 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.
622
623The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
624
625Returns:
626 An object of the form:
627
628 { # Represents an Operation resource.
629 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700630 # Google Compute Engine has three Operation resources:
631 #
632 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
633 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
635 #
636 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 # - For global operations, use the `globalOperations` resource.
638 # - For regional operations, use the `regionOperations` resource.
639 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 # 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 -0700642 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
643 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
644 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
645 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
646 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
647 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
650 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
651 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 },
653 ],
654 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 &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`.
656 &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.
657 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
658 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
659 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
660 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
661 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
662 &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.
663 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
664 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
665 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
666 &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.
667 &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`.
668 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
669 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
670 &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.
671 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
672 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
673 {
674 &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.
675 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
676 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
677 {
678 &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).
679 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
680 },
681 ],
682 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
683 },
684 ],
685 &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 -0700686 }</pre>
687</div>
688
689<div class="method">
690 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
691 <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.
692
693Args:
694 project: string, Project ID for this request. (required)
695 zone: string, The name of the zone where the managed instance group is located. (required)
696 instanceGroupManager: string, The name of the managed instance group to delete. (required)
697 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.
698
699For 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.
700
701The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
702
703Returns:
704 An object of the form:
705
706 { # Represents an Operation resource.
707 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700708 # Google Compute Engine has three Operation resources:
709 #
710 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
711 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700712 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
713 #
714 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700715 # - For global operations, use the `globalOperations` resource.
716 # - For regional operations, use the `regionOperations` resource.
717 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 # 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 -0700720 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
721 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
722 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
723 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
724 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
725 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700726 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
728 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
729 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700730 },
731 ],
732 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 &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`.
734 &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.
735 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
736 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
737 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
738 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
739 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
740 &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.
741 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
742 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
743 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
744 &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.
745 &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`.
746 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
747 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
748 &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.
749 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
750 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
751 {
752 &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.
753 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
754 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
755 {
756 &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).
757 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
758 },
759 ],
760 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
761 },
762 ],
763 &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 -0700764 }</pre>
765</div>
766
767<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700768 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 <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 -0700770
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400771If 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.
772
773You can specify a maximum of 1000 instances with this method per request.
774
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700775Args:
776 project: string, Project ID for this request. (required)
777 zone: string, The name of the zone where the managed instance group is located. (required)
778 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700779 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700780 The object takes the form of:
781
782{
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 &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].
784 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700785 ],
786 }
787
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700788 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.
789
790For 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.
791
792The 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 -0700793
794Returns:
795 An object of the form:
796
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 { # Represents an Operation resource.
798 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700799 # Google Compute Engine has three Operation resources:
800 #
801 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
802 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
804 #
805 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 # - For global operations, use the `globalOperations` resource.
807 # - For regional operations, use the `regionOperations` resource.
808 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700809 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 # 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 -0700811 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
812 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
813 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
814 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
815 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
816 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700818 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
819 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
820 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 },
822 ],
823 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700824 &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`.
825 &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.
826 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
827 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
828 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
829 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
830 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
831 &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.
832 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
833 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
834 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
835 &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.
836 &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`.
837 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
838 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
839 &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.
840 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
841 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
842 {
843 &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.
844 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
845 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
846 {
847 &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).
848 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
849 },
850 ],
851 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
852 },
853 ],
854 &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 -0700855 }</pre>
856</div>
857
858<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700860 <pre>Deletes selected per-instance configs for the managed instance group.
861
862Args:
863 project: string, Project ID for this request. (required)
864 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
865 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700866 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700867 The object takes the form of:
868
869{ # InstanceGroupManagers.deletePerInstanceConfigs
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 &quot;names&quot;: [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
871 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700872 ],
873 }
874
875
876Returns:
877 An object of the form:
878
879 { # Represents an Operation resource.
880 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700881 # Google Compute Engine has three Operation resources:
882 #
883 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
884 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700885 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
886 #
887 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 # - For global operations, use the `globalOperations` resource.
889 # - For regional operations, use the `regionOperations` resource.
890 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700892 # 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 -0700893 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
894 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
895 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
896 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
897 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
898 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700899 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
901 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
902 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700903 },
904 ],
905 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &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`.
907 &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.
908 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
909 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
910 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
911 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
912 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
913 &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.
914 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
915 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
916 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
917 &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.
918 &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`.
919 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
920 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
921 &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.
922 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
923 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
924 {
925 &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.
926 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
927 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
928 {
929 &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).
930 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
931 },
932 ],
933 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
934 },
935 ],
936 &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 -0700937 }</pre>
938</div>
939
940<div class="method">
941 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700942 <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 -0700943
944Args:
945 project: string, Project ID for this request. (required)
946 zone: string, The name of the zone where the managed instance group is located. (required)
947 instanceGroupManager: string, The name of the managed instance group. (required)
948
949Returns:
950 An object of the form:
951
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700952 { # Represents a Managed Instance Group resource.
953 #
954 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
955 #
956 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
957 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700958 # 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 -0700959 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800960 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
962 &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].
963 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When &#x27;percent&#x27; is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance&#x27;s status is RUNNING. 2. Instance&#x27;s currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700964 #
965 # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 #
968 #
969 # - If the value is fixed, then the calculated value is equal to the fixed value.
970 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -0700971 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
972 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800973 },
974 },
975 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700976 &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.
977 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
978 &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.
979 &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.
980 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800981 #
982 # 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 -0700983 &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.
984 &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.
985 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
986 &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.
987 &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.
988 &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.
989 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800990 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
992 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
993 &quot;targetShape&quot;: &quot;A String&quot;, # The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). The possible values are EVEN and ANY. For EVEN the group attempts to preserve a balanced number of instances across zones. For ANY the group creates new instances where resources are available to fulfill the request; as a result, instances may be distributed unevenly across zones in this mode. The default value is EVEN.
994 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400995 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400997 },
998 ],
999 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 &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.
1001 &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.
1002 #
1003 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1004 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1005 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1006 &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.
1007 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1008 &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.
1009 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1010 { # The named port. For example: .
1011 &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.
1012 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1013 },
1014 ],
1015 &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.
1016 &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.
1017 &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.
1018 &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.
1019 &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.
1020 },
1021 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1022 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1023 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1024 &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.
1025 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1026 &quot;preservedState&quot;: { # Configuration of preserved resources.
1027 &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.
1028 &quot;a_key&quot;: {
1029 &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 -07001030 },
1031 },
1032 },
1033 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1035 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1036 &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.
1037 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1038 &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.
1039 &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 -07001040 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1041 &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.
1042 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001043 },
1044 &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.
1045 &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.
1046 },
1047 },
1048 &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.
1049 &quot;A String&quot;,
1050 ],
1051 &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.
1052 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1053 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1054 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1055 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1056 &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.
1057 #
1058 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1059 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1060 #
1061 #
1062 # - If the value is fixed, then the calculated value is equal to the fixed value.
1063 # - 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.
1064 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1065 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1066 },
1067 &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:
1068 #
1069 #
1070 # - The instance&#x27;s status is RUNNING.
1071 # - 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.
1072 #
1073 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1074 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1075 #
1076 #
1077 # - If the value is fixed, then the calculated value is equal to the fixed value.
1078 # - 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.
1079 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1080 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1081 },
1082 &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].
1083 &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.
1084 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1085 &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).
1086 },
1087 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1088 #
1089 # 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.
1090 {
1091 &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.
1092 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1093 &quot;tag&quot;: &quot;A String&quot;, # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of &#x27;name&#x27;.
1094 &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:
1095 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1096 # - 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.
1097 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1098 #
1099 #
1100 # - If the value is fixed, then the calculated value is equal to the fixed value.
1101 # - 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.
1102 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1103 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1104 },
1105 },
1106 ],
1107 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001108 }</pre>
1109</div>
1110
1111<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001112 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001113 <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.
1114
1115A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
1116
1117Args:
1118 project: string, Project ID for this request. (required)
1119 zone: string, The name of the zone where you want to create the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001120 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001121 The object takes the form of:
1122
1123{ # Represents a Managed Instance Group resource.
1124 #
1125 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1126 #
1127 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1128 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001129 # 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 -07001130 &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 -07001131 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1133 &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].
1134 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When &#x27;percent&#x27; is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance&#x27;s status is RUNNING. 2. Instance&#x27;s currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001135 #
1136 # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001137 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001138 #
1139 #
1140 # - If the value is fixed, then the calculated value is equal to the fixed value.
1141 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -07001142 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1143 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001144 },
1145 },
1146 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 &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.
1148 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1149 &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.
1150 &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.
1151 &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 -07001152 #
1153 # 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 -07001154 &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.
1155 &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.
1156 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1157 &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.
1158 &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.
1159 &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.
1160 &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 -07001161 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001162 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1163 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
1164 &quot;targetShape&quot;: &quot;A String&quot;, # The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). The possible values are EVEN and ANY. For EVEN the group attempts to preserve a balanced number of instances across zones. For ANY the group creates new instances where resources are available to fulfill the request; as a result, instances may be distributed unevenly across zones in this mode. The default value is EVEN.
1165 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001166 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001167 &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 -07001168 },
1169 ],
1170 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001171 &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.
1172 &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.
1173 #
1174 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1175 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1176 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1177 &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.
1178 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1179 &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.
1180 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1181 { # The named port. For example: .
1182 &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.
1183 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1184 },
1185 ],
1186 &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.
1187 &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.
1188 &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.
1189 &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.
1190 &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.
1191 },
1192 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1193 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1194 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1195 &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.
1196 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1197 &quot;preservedState&quot;: { # Configuration of preserved resources.
1198 &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.
1199 &quot;a_key&quot;: {
1200 &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 -07001201 },
1202 },
1203 },
1204 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1206 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1207 &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.
1208 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1209 &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.
1210 &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 -07001211 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1212 &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.
1213 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001214 },
1215 &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.
1216 &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.
1217 },
1218 },
1219 &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.
1220 &quot;A String&quot;,
1221 ],
1222 &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.
1223 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1224 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1225 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1226 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1227 &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.
1228 #
1229 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1230 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1231 #
1232 #
1233 # - If the value is fixed, then the calculated value is equal to the fixed value.
1234 # - 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.
1235 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1236 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1237 },
1238 &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:
1239 #
1240 #
1241 # - The instance&#x27;s status is RUNNING.
1242 # - 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.
1243 #
1244 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1245 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1246 #
1247 #
1248 # - If the value is fixed, then the calculated value is equal to the fixed value.
1249 # - 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.
1250 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1251 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1252 },
1253 &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].
1254 &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.
1255 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1256 &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).
1257 },
1258 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1259 #
1260 # 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.
1261 {
1262 &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.
1263 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1264 &quot;tag&quot;: &quot;A String&quot;, # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of &#x27;name&#x27;.
1265 &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:
1266 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1267 # - 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.
1268 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1269 #
1270 #
1271 # - If the value is fixed, then the calculated value is equal to the fixed value.
1272 # - 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.
1273 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1274 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1275 },
1276 },
1277 ],
1278 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001279}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001280
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001281 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.
1282
1283For 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.
1284
1285The 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 -07001286
1287Returns:
1288 An object of the form:
1289
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 { # Represents an Operation resource.
1291 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001292 # Google Compute Engine has three Operation resources:
1293 #
1294 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1295 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001296 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1297 #
1298 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001299 # - For global operations, use the `globalOperations` resource.
1300 # - For regional operations, use the `regionOperations` resource.
1301 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001302 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001303 # 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 -07001304 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1305 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1306 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1307 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1308 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1309 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001310 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001311 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1312 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1313 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001314 },
1315 ],
1316 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 &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`.
1318 &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.
1319 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1320 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1321 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1322 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1323 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1324 &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.
1325 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1326 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1327 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1328 &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.
1329 &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`.
1330 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1331 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1332 &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.
1333 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1334 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1335 {
1336 &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.
1337 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1338 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1339 {
1340 &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).
1341 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1342 },
1343 ],
1344 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1345 },
1346 ],
1347 &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 -07001348 }</pre>
1349</div>
1350
1351<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001352 <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 -07001353 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1354
1355Args:
1356 project: string, Project ID for this request. (required)
1357 zone: string, The name of the zone where the managed instance group is located. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001358 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 -07001359
Dan O'Mearadd494642020-05-01 07:42:23 -07001360For 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 -07001361
Dan O'Mearadd494642020-05-01 07:42:23 -07001362You 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 -07001363
Bu Sun Kim65020912020-05-20 12:08:20 -07001364To 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) ```
1365 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`)
1366 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1367
1368You 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.
1369
1370Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1371 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.
1372 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 -07001373
1374Returns:
1375 An object of the form:
1376
1377 { # [Output Only] A list of managed instance groups.
Bu Sun Kim65020912020-05-20 12:08:20 -07001378 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1379 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001380 { # Represents a Managed Instance Group resource.
1381 #
1382 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1383 #
1384 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1385 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001386 # 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 -07001387 &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 -07001388 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001389 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1390 &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].
1391 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When &#x27;percent&#x27; is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance&#x27;s status is RUNNING. 2. Instance&#x27;s currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001392 #
1393 # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001394 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001395 #
1396 #
1397 # - If the value is fixed, then the calculated value is equal to the fixed value.
1398 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -07001399 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1400 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001401 },
1402 },
1403 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001404 &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.
1405 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1406 &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.
1407 &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.
1408 &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 -07001409 #
1410 # 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 -07001411 &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.
1412 &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.
1413 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1414 &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.
1415 &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.
1416 &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.
1417 &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 -07001418 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001419 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1420 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
1421 &quot;targetShape&quot;: &quot;A String&quot;, # The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). The possible values are EVEN and ANY. For EVEN the group attempts to preserve a balanced number of instances across zones. For ANY the group creates new instances where resources are available to fulfill the request; as a result, instances may be distributed unevenly across zones in this mode. The default value is EVEN.
1422 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001423 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001424 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001425 },
1426 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001428 &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.
1429 &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.
1430 #
1431 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1432 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1433 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1434 &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.
1435 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1436 &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.
1437 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1438 { # The named port. For example: .
1439 &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.
1440 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1441 },
1442 ],
1443 &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.
1444 &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.
1445 &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.
1446 &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.
1447 &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.
1448 },
1449 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1450 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1451 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1452 &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.
1453 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1454 &quot;preservedState&quot;: { # Configuration of preserved resources.
1455 &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.
1456 &quot;a_key&quot;: {
1457 &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 -07001458 },
1459 },
1460 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001461 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1463 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1464 &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.
1465 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1466 &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.
1467 &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 -07001468 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1469 &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.
1470 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001471 },
1472 &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.
1473 &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.
1474 },
1475 },
1476 &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.
1477 &quot;A String&quot;,
1478 ],
1479 &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.
1480 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1481 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1482 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1483 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1484 &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.
1485 #
1486 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1487 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1488 #
1489 #
1490 # - If the value is fixed, then the calculated value is equal to the fixed value.
1491 # - 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.
1492 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1493 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1494 },
1495 &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:
1496 #
1497 #
1498 # - The instance&#x27;s status is RUNNING.
1499 # - 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.
1500 #
1501 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1502 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1503 #
1504 #
1505 # - If the value is fixed, then the calculated value is equal to the fixed value.
1506 # - 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.
1507 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1508 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1509 },
1510 &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].
1511 &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.
1512 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1513 &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).
1514 },
1515 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1516 #
1517 # 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.
1518 {
1519 &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.
1520 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1521 &quot;tag&quot;: &quot;A String&quot;, # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of &#x27;name&#x27;.
1522 &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:
1523 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1524 # - 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.
1525 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1526 #
1527 #
1528 # - If the value is fixed, then the calculated value is equal to the fixed value.
1529 # - 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.
1530 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1531 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1532 },
1533 },
1534 ],
1535 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001536 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001537 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001538 &quot;kind&quot;: &quot;compute#instanceGroupManagerList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1539 &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.
1540 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1541 &quot;warning&quot;: { # [Output Only] Informational warning message.
1542 &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.
1543 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1544 # &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 -07001545 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001546 &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).
1547 &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 -07001548 },
1549 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001550 &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 -07001551 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001552 }</pre>
1553</div>
1554
1555<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001556 <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 -07001557 <pre>Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558
1559Args:
1560 project: string, Project ID for this request. (required)
1561 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1562 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 -07001563 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 -07001564
Dan O'Mearadd494642020-05-01 07:42:23 -07001565For 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 -07001566
Dan O'Mearadd494642020-05-01 07:42:23 -07001567You 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 -07001568
Bu Sun Kim65020912020-05-20 12:08:20 -07001569To 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) ```
1570 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`)
1571 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1572
1573You 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.
1574
1575Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1576 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.
1577 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001578
1579Returns:
1580 An object of the form:
1581
1582 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001583 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001584 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001585 &quot;error&quot;: { # [Output Only] Contents of the error.
1586 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1587 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
1588 },
1589 &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.
1590 &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:
1591 &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.
1592 &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.
1593 &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 }.
1594 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001595 },
1596 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001597 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001598 },
1599 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001600 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001601 }</pre>
1602</div>
1603
1604<div class="method">
1605 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1606 <pre>Retrieves the next page of results.
1607
1608Args:
1609 previous_request: The request for the previous page. (required)
1610 previous_response: The response from the request for the previous page. (required)
1611
1612Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001613 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001614 page. Returns None if there are no more items in the collection.
1615 </pre>
1616</div>
1617
1618<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001619 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
1620 <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 -07001621
1622Args:
1623 project: string, Project ID for this request. (required)
1624 zone: string, The name of the zone where the managed instance group is located. (required)
1625 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001626 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 -07001627
Dan O'Mearadd494642020-05-01 07:42:23 -07001628For 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 -07001629
Dan O'Mearadd494642020-05-01 07:42:23 -07001630You 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 -07001631
Bu Sun Kim65020912020-05-20 12:08:20 -07001632To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1633 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1634 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1635
1636You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1637
1638Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1639 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001640 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 -07001641
1642Returns:
1643 An object of the form:
1644
1645 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001646 &quot;managedInstances&quot;: [ # [Output Only] The list of instances in the managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001647 { # A Managed Instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001648 &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 Cheemalapatidf613972016-10-21 13:59:49 -07001649 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1650 # - 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 -07001651 # - 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 Cheemalapatidf613972016-10-21 13:59:49 -07001652 # - RECREATING The managed instance group is recreating this instance.
1653 # - DELETING The managed instance group is permanently deleting this instance.
1654 # - 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.
1655 # - RESTARTING The managed instance group is restarting the instance.
1656 # - 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 -07001657 # - 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 -07001658 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1659 &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.
1660 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1661 {
1662 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1663 &quot;healthCheck&quot;: &quot;A String&quot;, # [Output Only] The URL for the health check that verifies whether the instance is healthy.
1664 &quot;healthState&quot;: &quot;A String&quot;, # [Output Only] The current instance health state. This field will not get promoted to beta/GA and might be removed from alpha APIs after 01/12/2019. Please use detailed_health_state field instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001665 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001666 ],
1667 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1668 &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 }.
1669 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1670 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1671 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1672 {
1673 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1674 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1675 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1676 },
1677 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001678 },
1679 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001680 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1681 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1682 &quot;a_key&quot;: {
1683 &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.
1684 &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.
1685 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1686 },
1687 },
1688 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1689 &quot;a_key&quot;: &quot;A String&quot;,
1690 },
1691 },
1692 &quot;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1693 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1694 &quot;a_key&quot;: {
1695 &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.
1696 &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.
1697 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1698 },
1699 },
1700 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1701 &quot;a_key&quot;: &quot;A String&quot;,
1702 },
1703 },
1704 &quot;tag&quot;: &quot;A String&quot;, # [Output Only] Tag describing the version.
1705 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1706 &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 }.
1707 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1708 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001709 },
1710 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001711 &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 -07001712 }</pre>
1713</div>
1714
1715<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001716 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1717 <pre>Retrieves the next page of results.
1718
1719Args:
1720 previous_request: The request for the previous page. (required)
1721 previous_response: The response from the request for the previous page. (required)
1722
1723Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001724 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001725 page. Returns None if there are no more items in the collection.
1726 </pre>
1727</div>
1728
1729<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001730 <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 -07001731 <pre>Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001732
1733Args:
1734 project: string, Project ID for this request. (required)
1735 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1736 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001737 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 -07001738
Dan O'Mearadd494642020-05-01 07:42:23 -07001739For 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 -07001740
Dan O'Mearadd494642020-05-01 07:42:23 -07001741You 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 -07001742
Bu Sun Kim65020912020-05-20 12:08:20 -07001743To 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) ```
1744 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`)
1745 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1746
1747You 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.
1748
1749Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1750 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.
1751 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001752
1753Returns:
1754 An object of the form:
1755
1756 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001757 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001758 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001759 &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.
1760 &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.
1761 &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.
1762 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1763 &quot;a_key&quot;: {
1764 &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.
1765 &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.
1766 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001767 },
1768 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001769 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1770 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001771 },
1772 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001773 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001774 },
1775 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001776 &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.
1777 &quot;warning&quot;: { # [Output Only] Informational warning message.
1778 &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.
1779 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1780 # &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 -07001781 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001782 &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).
1783 &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 -07001784 },
1785 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001786 &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 -07001787 },
1788 }</pre>
1789</div>
1790
1791<div class="method">
1792 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1793 <pre>Retrieves the next page of results.
1794
1795Args:
1796 previous_request: The request for the previous page. (required)
1797 previous_response: The response from the request for the previous page. (required)
1798
1799Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001800 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001801 page. Returns None if there are no more items in the collection.
1802 </pre>
1803</div>
1804
1805<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001806 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1807 <pre>Retrieves the next page of results.
1808
1809Args:
1810 previous_request: The request for the previous page. (required)
1811 previous_response: The response from the request for the previous page. (required)
1812
1813Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001814 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001815 page. Returns None if there are no more items in the collection.
1816 </pre>
1817</div>
1818
1819<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001820 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001821 <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 Cheemalapatidf613972016-10-21 13:59:49 -07001822
1823Args:
1824 project: string, Project ID for this request. (required)
1825 zone: string, The name of the zone where you want to create the managed instance group. (required)
1826 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001827 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001828 The object takes the form of:
1829
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001830{ # Represents a Managed Instance Group resource.
1831 #
1832 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1833 #
1834 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1835 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001836 # 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 -07001837 &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 -07001838 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001839 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1840 &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].
1841 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When &#x27;percent&#x27; is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance&#x27;s status is RUNNING. 2. Instance&#x27;s currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001842 #
1843 # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001844 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001845 #
1846 #
1847 # - If the value is fixed, then the calculated value is equal to the fixed value.
1848 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -07001849 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1850 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001851 },
1852 },
1853 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001854 &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.
1855 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1856 &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.
1857 &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.
1858 &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 -07001859 #
1860 # 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 -07001861 &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.
1862 &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.
1863 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1864 &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.
1865 &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.
1866 &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.
1867 &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 -07001868 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001869 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1870 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
1871 &quot;targetShape&quot;: &quot;A String&quot;, # The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). The possible values are EVEN and ANY. For EVEN the group attempts to preserve a balanced number of instances across zones. For ANY the group creates new instances where resources are available to fulfill the request; as a result, instances may be distributed unevenly across zones in this mode. The default value is EVEN.
1872 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001873 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001874 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001875 },
1876 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001877 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001878 &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.
1879 &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.
1880 #
1881 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1882 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1883 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1884 &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.
1885 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1886 &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.
1887 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1888 { # The named port. For example: .
1889 &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.
1890 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1891 },
1892 ],
1893 &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.
1894 &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.
1895 &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.
1896 &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.
1897 &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.
1898 },
1899 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1900 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1901 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1902 &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.
1903 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1904 &quot;preservedState&quot;: { # Configuration of preserved resources.
1905 &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.
1906 &quot;a_key&quot;: {
1907 &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 -07001908 },
1909 },
1910 },
1911 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001912 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1913 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1914 &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.
1915 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1916 &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.
1917 &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 -07001918 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1919 &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.
1920 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001921 },
1922 &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.
1923 &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.
1924 },
1925 },
1926 &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.
1927 &quot;A String&quot;,
1928 ],
1929 &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.
1930 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1931 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1932 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1933 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1934 &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.
1935 #
1936 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1937 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1938 #
1939 #
1940 # - If the value is fixed, then the calculated value is equal to the fixed value.
1941 # - 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.
1942 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1943 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1944 },
1945 &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:
1946 #
1947 #
1948 # - The instance&#x27;s status is RUNNING.
1949 # - 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.
1950 #
1951 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1952 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1953 #
1954 #
1955 # - If the value is fixed, then the calculated value is equal to the fixed value.
1956 # - 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.
1957 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1958 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1959 },
1960 &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].
1961 &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.
1962 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1963 &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).
1964 },
1965 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1966 #
1967 # 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.
1968 {
1969 &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.
1970 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1971 &quot;tag&quot;: &quot;A String&quot;, # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of &#x27;name&#x27;.
1972 &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:
1973 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1974 # - 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.
1975 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1976 #
1977 #
1978 # - If the value is fixed, then the calculated value is equal to the fixed value.
1979 # - 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.
1980 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1981 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1982 },
1983 },
1984 ],
1985 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001986}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001987
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001988 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.
1989
1990For 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.
1991
1992The 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 -07001993
1994Returns:
1995 An object of the form:
1996
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001997 { # Represents an Operation resource.
1998 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001999 # Google Compute Engine has three Operation resources:
2000 #
2001 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2002 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002003 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2004 #
2005 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 # - For global operations, use the `globalOperations` resource.
2007 # - For regional operations, use the `regionOperations` resource.
2008 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002009 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002010 # 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 -07002011 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2012 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2013 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2014 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2015 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2016 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002017 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002018 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2019 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2020 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 },
2022 ],
2023 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002024 &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`.
2025 &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.
2026 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2027 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2028 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2029 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2030 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2031 &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.
2032 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2033 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2034 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2035 &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.
2036 &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`.
2037 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2038 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2039 &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.
2040 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2041 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2042 {
2043 &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.
2044 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2045 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2046 {
2047 &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).
2048 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2049 },
2050 ],
2051 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2052 },
2053 ],
2054 &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 -07002055 }</pre>
2056</div>
2057
2058<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002059 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2060 <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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002061
2062Args:
2063 project: string, Project ID for this request. (required)
2064 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2065 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002066 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002067 The object takes the form of:
2068
2069{ # InstanceGroupManagers.patchPerInstanceConfigs
Bu Sun Kim65020912020-05-20 12:08:20 -07002070 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002071 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002072 &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.
2073 &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.
2074 &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.
2075 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2076 &quot;a_key&quot;: {
2077 &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.
2078 &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.
2079 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002080 },
2081 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002082 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2083 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002084 },
2085 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002086 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002087 },
2088 ],
2089 }
2090
2091 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.
2092
2093For 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.
2094
2095The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2096
2097Returns:
2098 An object of the form:
2099
2100 { # Represents an Operation resource.
2101 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002102 # Google Compute Engine has three Operation resources:
2103 #
2104 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2105 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002106 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2107 #
2108 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002109 # - For global operations, use the `globalOperations` resource.
2110 # - For regional operations, use the `regionOperations` resource.
2111 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002112 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002113 # 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 -07002114 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2115 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2116 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2117 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2118 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2119 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002120 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002121 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2122 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2123 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002124 },
2125 ],
2126 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002127 &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`.
2128 &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.
2129 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2130 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2131 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2132 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2133 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2134 &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.
2135 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2136 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2137 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2138 &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.
2139 &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`.
2140 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2141 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2142 &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.
2143 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2144 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2145 {
2146 &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.
2147 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2148 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2149 {
2150 &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).
2151 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2152 },
2153 ],
2154 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2155 },
2156 ],
2157 &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 -07002158 }</pre>
2159</div>
2160
2161<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002162 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002163 <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 -07002164
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002165If 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.
2166
2167You can specify a maximum of 1000 instances with this method per request.
2168
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002169Args:
2170 project: string, Project ID for this request. (required)
2171 zone: string, The name of the zone where the managed instance group is located. (required)
2172 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002173 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002174 The object takes the form of:
2175
2176{
Bu Sun Kim65020912020-05-20 12:08:20 -07002177 &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].
2178 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002179 ],
2180 }
2181
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002182 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.
2183
2184For 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.
2185
2186The 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 -07002187
2188Returns:
2189 An object of the form:
2190
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002191 { # Represents an Operation resource.
2192 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002193 # Google Compute Engine has three Operation resources:
2194 #
2195 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2196 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002197 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2198 #
2199 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002200 # - For global operations, use the `globalOperations` resource.
2201 # - For regional operations, use the `regionOperations` resource.
2202 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002203 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002204 # 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 -07002205 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2206 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2207 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2208 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2209 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2210 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002211 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002212 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2213 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2214 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002215 },
2216 ],
2217 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002218 &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`.
2219 &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.
2220 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2221 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2222 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2223 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2224 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2225 &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.
2226 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2227 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2228 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2229 &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.
2230 &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`.
2231 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2232 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2233 &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.
2234 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2235 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2236 {
2237 &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.
2238 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2239 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2240 {
2241 &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).
2242 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2243 },
2244 ],
2245 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2246 },
2247 ],
2248 &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 -07002249 }</pre>
2250</div>
2251
2252<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002253 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002254 <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.
2255
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002256When 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:
2257
2258+ 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.
2259
2260This list is subject to change.
2261
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002262If 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.
2263
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002264Args:
2265 project: string, Project ID for this request. (required)
2266 zone: string, The name of the zone where the managed instance group is located. (required)
2267 instanceGroupManager: string, The name of the managed instance group. (required)
2268 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 -07002269 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.
2270
2271For 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.
2272
2273The 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 -07002274
2275Returns:
2276 An object of the form:
2277
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002278 { # Represents an Operation resource.
2279 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002280 # Google Compute Engine has three Operation resources:
2281 #
2282 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2283 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002284 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2285 #
2286 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002287 # - For global operations, use the `globalOperations` resource.
2288 # - For regional operations, use the `regionOperations` resource.
2289 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002290 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002291 # 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 -07002292 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2293 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2294 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2295 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2296 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2297 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002298 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002299 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2300 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2301 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002302 },
2303 ],
2304 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002305 &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`.
2306 &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.
2307 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2308 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2309 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2310 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2311 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2312 &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.
2313 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2314 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2315 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2316 &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.
2317 &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`.
2318 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2319 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2320 &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.
2321 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2322 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2323 {
2324 &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.
2325 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2326 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2327 {
2328 &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).
2329 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2330 },
2331 ],
2332 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2333 },
2334 ],
2335 &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 -07002336 }</pre>
2337</div>
2338
2339<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002340 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002341 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
2342
2343If 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.
2344
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002345If 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.
2346
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002347Args:
2348 project: string, Project ID for this request. (required)
2349 zone: string, The name of the zone where the managed instance group is located. (required)
2350 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002351 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002352 The object takes the form of:
2353
2354{
Bu Sun Kim65020912020-05-20 12:08:20 -07002355 &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 -07002356 #
2357 # 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.
2358 #
2359 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
2360 #
2361 # 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 -07002362 &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 -07002363 }
2364
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002365 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.
2366
2367For 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.
2368
2369The 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 -07002370
2371Returns:
2372 An object of the form:
2373
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002374 { # Represents an Operation resource.
2375 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002376 # Google Compute Engine has three Operation resources:
2377 #
2378 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2379 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002380 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2381 #
2382 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002383 # - For global operations, use the `globalOperations` resource.
2384 # - For regional operations, use the `regionOperations` resource.
2385 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002386 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002387 # 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 -07002388 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2389 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2390 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2391 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2392 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2393 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002394 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002395 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2396 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2397 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002398 },
2399 ],
2400 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002401 &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`.
2402 &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.
2403 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2404 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2405 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2406 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2407 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2408 &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.
2409 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2410 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2411 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2412 &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.
2413 &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`.
2414 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2415 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2416 &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.
2417 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2418 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2419 {
2420 &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.
2421 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2422 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2423 {
2424 &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).
2425 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2426 },
2427 ],
2428 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2429 },
2430 ],
2431 &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 -07002432 }</pre>
2433</div>
2434
2435<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002436 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002437 <pre>Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002438
2439Args:
2440 project: string, Project ID for this request. (required)
2441 zone: string, The name of the zone where the managed instance group is located. (required)
2442 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002443 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002444 The object takes the form of:
2445
2446{
Bu Sun Kim65020912020-05-20 12:08:20 -07002447 &quot;autoHealingPolicies&quot;: [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002448 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002449 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2450 &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].
2451 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When &#x27;percent&#x27; is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance&#x27;s status is RUNNING. 2. Instance&#x27;s currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002452 #
2453 # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002454 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002455 #
2456 #
2457 # - If the value is fixed, then the calculated value is equal to the fixed value.
2458 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -07002459 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2460 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002461 },
2462 },
2463 ],
2464 }
2465
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002466 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.
2467
2468For 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.
2469
2470The 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 -07002471
2472Returns:
2473 An object of the form:
2474
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002475 { # Represents an Operation resource.
2476 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002477 # Google Compute Engine has three Operation resources:
2478 #
2479 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2480 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002481 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2482 #
2483 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002484 # - For global operations, use the `globalOperations` resource.
2485 # - For regional operations, use the `regionOperations` resource.
2486 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002487 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002488 # 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 -07002489 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2490 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2491 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2492 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2493 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2494 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002495 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002496 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2497 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2498 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002499 },
2500 ],
2501 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002502 &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`.
2503 &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.
2504 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2505 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2506 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2507 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2508 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2509 &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.
2510 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2511 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2512 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2513 &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.
2514 &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`.
2515 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2516 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2517 &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.
2518 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2519 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2520 {
2521 &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.
2522 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2523 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2524 {
2525 &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).
2526 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2527 },
2528 ],
2529 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2530 },
2531 ],
2532 &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 -07002533 }</pre>
2534</div>
2535
2536<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002537 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002538 <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.
2539
2540Args:
2541 project: string, Project ID for this request. (required)
2542 zone: string, The name of the zone where the managed instance group is located. (required)
2543 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002544 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002545 The object takes the form of:
2546
2547{
Bu Sun Kim65020912020-05-20 12:08:20 -07002548 &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 -07002549 }
2550
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002551 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.
2552
2553For 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.
2554
2555The 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 -07002556
2557Returns:
2558 An object of the form:
2559
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002560 { # Represents an Operation resource.
2561 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002562 # Google Compute Engine has three Operation resources:
2563 #
2564 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2565 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002566 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2567 #
2568 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002569 # - For global operations, use the `globalOperations` resource.
2570 # - For regional operations, use the `regionOperations` resource.
2571 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002572 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002573 # 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 -07002574 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2575 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2576 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2577 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2578 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2579 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002580 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002581 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2582 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2583 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002584 },
2585 ],
2586 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002587 &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`.
2588 &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.
2589 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2590 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2591 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2592 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2593 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2594 &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.
2595 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2596 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2597 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2598 &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.
2599 &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`.
2600 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2601 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2602 &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.
2603 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2604 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2605 {
2606 &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.
2607 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2608 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2609 {
2610 &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).
2611 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2612 },
2613 ],
2614 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2615 },
2616 ],
2617 &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 -07002618 }</pre>
2619</div>
2620
2621<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002622 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002623 <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.
2624
2625Args:
2626 project: string, Project ID for this request. (required)
2627 zone: string, The name of the zone where the managed instance group is located. (required)
2628 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002629 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002630 The object takes the form of:
2631
2632{
Bu Sun Kim65020912020-05-20 12:08:20 -07002633 &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.
2634 &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.
2635 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002636 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002637 }
2638
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002639 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.
2640
2641For 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.
2642
2643The 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 -07002644
2645Returns:
2646 An object of the form:
2647
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002648 { # Represents an Operation resource.
2649 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002650 # Google Compute Engine has three Operation resources:
2651 #
2652 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2653 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002654 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2655 #
2656 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002657 # - For global operations, use the `globalOperations` resource.
2658 # - For regional operations, use the `regionOperations` resource.
2659 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002660 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002661 # 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 -07002662 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2663 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2664 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2665 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2666 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2667 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002668 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002669 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2670 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2671 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002672 },
2673 ],
2674 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002675 &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`.
2676 &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.
2677 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2678 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2679 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2680 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2681 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2682 &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.
2683 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2684 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2685 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2686 &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.
2687 &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`.
2688 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2689 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2690 &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.
2691 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2692 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2693 {
2694 &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.
2695 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2696 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2697 {
2698 &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).
2699 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2700 },
2701 ],
2702 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2703 },
2704 ],
2705 &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 -07002706 }</pre>
2707</div>
2708
2709<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002710 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002711 <pre>Returns permissions that a caller has on the specified resource.
2712
2713Args:
2714 project: string, Project ID for this request. (required)
2715 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002716 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002717 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002718 The object takes the form of:
2719
2720{
Bu Sun Kim65020912020-05-20 12:08:20 -07002721 &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.
2722 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002723 ],
2724 }
2725
2726
2727Returns:
2728 An object of the form:
2729
2730 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002731 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2732 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002733 ],
2734 }</pre>
2735</div>
2736
2737<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002738 <code class="details" id="update">update(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002739 <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 Cheemalapatidf613972016-10-21 13:59:49 -07002740
2741Args:
2742 project: string, Project ID for this request. (required)
2743 zone: string, The name of the zone where you want to create the managed instance group. (required)
2744 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002745 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002746 The object takes the form of:
2747
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002748{ # Represents a Managed Instance Group resource.
2749 #
2750 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2751 #
2752 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2753 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002754 # 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 -07002755 &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 -07002756 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002757 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2758 &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].
2759 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When &#x27;percent&#x27; is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance&#x27;s status is RUNNING. 2. Instance&#x27;s currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002760 #
2761 # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002762 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002763 #
2764 #
2765 # - If the value is fixed, then the calculated value is equal to the fixed value.
2766 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -07002767 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2768 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002769 },
2770 },
2771 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002772 &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.
2773 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2774 &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.
2775 &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.
2776 &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 -07002777 #
2778 # 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 -07002779 &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.
2780 &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.
2781 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2782 &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.
2783 &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.
2784 &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.
2785 &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 -07002786 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002787 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2788 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
2789 &quot;targetShape&quot;: &quot;A String&quot;, # The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). The possible values are EVEN and ANY. For EVEN the group attempts to preserve a balanced number of instances across zones. For ANY the group creates new instances where resources are available to fulfill the request; as a result, instances may be distributed unevenly across zones in this mode. The default value is EVEN.
2790 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002791 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002792 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002793 },
2794 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002795 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002796 &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.
2797 &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.
2798 #
2799 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2800 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2801 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
2802 &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.
2803 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2804 &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.
2805 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2806 { # The named port. For example: .
2807 &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.
2808 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
2809 },
2810 ],
2811 &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.
2812 &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.
2813 &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.
2814 &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.
2815 &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.
2816 },
2817 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2818 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
2819 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2820 &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.
2821 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
2822 &quot;preservedState&quot;: { # Configuration of preserved resources.
2823 &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.
2824 &quot;a_key&quot;: {
2825 &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 -07002826 },
2827 },
2828 },
2829 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002830 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
2831 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
2832 &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.
2833 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
2834 &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.
2835 &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 -07002836 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
2837 &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.
2838 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002839 },
2840 &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.
2841 &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.
2842 },
2843 },
2844 &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.
2845 &quot;A String&quot;,
2846 ],
2847 &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.
2848 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
2849 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
2850 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
2851 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
2852 &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.
2853 #
2854 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2855 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2856 #
2857 #
2858 # - If the value is fixed, then the calculated value is equal to the fixed value.
2859 # - 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.
2860 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2861 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2862 },
2863 &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:
2864 #
2865 #
2866 # - The instance&#x27;s status is RUNNING.
2867 # - 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.
2868 #
2869 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2870 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2871 #
2872 #
2873 # - If the value is fixed, then the calculated value is equal to the fixed value.
2874 # - 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.
2875 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2876 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2877 },
2878 &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].
2879 &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.
2880 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
2881 &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).
2882 },
2883 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
2884 #
2885 # 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.
2886 {
2887 &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.
2888 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
2889 &quot;tag&quot;: &quot;A String&quot;, # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of &#x27;name&#x27;.
2890 &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:
2891 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2892 # - 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.
2893 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2894 #
2895 #
2896 # - If the value is fixed, then the calculated value is equal to the fixed value.
2897 # - 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.
2898 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2899 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2900 },
2901 },
2902 ],
2903 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002904}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002905
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002906 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.
2907
2908For 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.
2909
2910The 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 -07002911
2912Returns:
2913 An object of the form:
2914
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002915 { # Represents an Operation resource.
2916 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002917 # Google Compute Engine has three Operation resources:
2918 #
2919 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2920 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002921 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2922 #
2923 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002924 # - For global operations, use the `globalOperations` resource.
2925 # - For regional operations, use the `regionOperations` resource.
2926 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002927 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002928 # 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 -07002929 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2930 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2931 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2932 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2933 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2934 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002935 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002936 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2937 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2938 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002939 },
2940 ],
2941 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002942 &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`.
2943 &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.
2944 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2945 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2946 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2947 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2948 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2949 &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.
2950 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2951 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2952 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2953 &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.
2954 &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`.
2955 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2956 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2957 &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.
2958 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2959 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2960 {
2961 &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.
2962 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2963 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2964 {
2965 &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).
2966 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2967 },
2968 ],
2969 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2970 },
2971 ],
2972 &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 -07002973 }</pre>
2974</div>
2975
2976<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002977 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2978 <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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002979
2980Args:
2981 project: string, Project ID for this request. (required)
2982 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2983 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002984 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002985 The object takes the form of:
2986
2987{ # InstanceGroupManagers.updatePerInstanceConfigs
Bu Sun Kim65020912020-05-20 12:08:20 -07002988 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002989 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002990 &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.
2991 &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.
2992 &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.
2993 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2994 &quot;a_key&quot;: {
2995 &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.
2996 &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.
2997 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002998 },
2999 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003000 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
3001 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003002 },
3003 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003004 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003005 },
3006 ],
3007 }
3008
3009 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.
3010
3011For 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.
3012
3013The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3014
3015Returns:
3016 An object of the form:
3017
3018 { # Represents an Operation resource.
3019 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003020 # Google Compute Engine has three Operation resources:
3021 #
3022 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3023 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003024 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3025 #
3026 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003027 # - For global operations, use the `globalOperations` resource.
3028 # - For regional operations, use the `regionOperations` resource.
3029 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003030 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003031 # 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 -07003032 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3033 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3034 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3035 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3036 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3037 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003038 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003039 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3040 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3041 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003042 },
3043 ],
3044 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003045 &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`.
3046 &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.
3047 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3048 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3049 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3050 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3051 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3052 &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.
3053 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3054 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3055 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3056 &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.
3057 &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`.
3058 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3059 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3060 &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.
3061 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3062 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3063 {
3064 &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.
3065 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3066 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3067 {
3068 &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).
3069 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3070 },
3071 ],
3072 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3073 },
3074 ],
3075 &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 -07003076 }</pre>
3077</div>
3078
3079</body></html>