blob: 9154c6b1baef21d04c2d0eb0919ff0ec70a6dbcf [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code><a href="#close">close()</a></code></p>
91<p class="firstline">Close httplib2 connections.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.</p>
95<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096 <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Deletes selected per-instance configs for the managed instance group.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
105 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
113<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 <code><a href="#listErrors">listErrors(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700115<p class="firstline">Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116<p class="toc_element">
117 <code><a href="#listErrors_next">listErrors_next(previous_request, previous_response)</a></code></p>
118<p class="firstline">Retrieves the next page of results.</p>
119<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700120 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
121<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400123 <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
124<p class="firstline">Retrieves the next page of results.</p>
125<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 <code><a href="#listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700127<p class="firstline">Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128<p class="toc_element">
129 <code><a href="#listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700132 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
133<p class="firstline">Retrieves the next page of results.</p>
134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code><a href="#patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
139<p class="firstline">Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142<p class="firstline">Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700143<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400144 <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145<p class="firstline">Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.</p>
146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700148<p class="firstline">Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.</p>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700154<p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<p class="firstline">Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#update">update(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400163<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
166<p class="firstline">Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167<h3>Method Details</h3>
168<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700169 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 <pre>Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700171
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400172If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
173
174You can specify a maximum of 1000 instances with this method per request.
175
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700176Args:
177 project: string, Project ID for this request. (required)
178 zone: string, The name of the zone where the managed instance group is located. (required)
179 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700181 The object takes the form of:
182
183{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800184 &quot;instances&quot;: [ # The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
185 &quot;A String&quot;,
186 ],
187}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
190
191For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
192
193The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194
195Returns:
196 An object of the form:
197
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800199 #
200 # Google Compute Engine has three Operation resources:
201 #
202 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
203 #
204 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
205 #
206 # Operations can be global, regional or zonal.
207 # - For global operations, use the `globalOperations` resource.
208 # - For regional operations, use the `regionOperations` resource.
209 # - For zonal operations, use the `zonalOperations` resource.
210 #
211 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
212 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
213 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
214 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
215 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
216 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
217 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800219 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
220 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
221 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 },
223 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800224 },
225 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
226 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
227 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
228 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
229 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
230 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
231 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
232 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
233 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
234 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
235 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
236 &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.
237 &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`.
238 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
239 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
240 &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.
241 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
242 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
243 {
244 &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.
245 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
246 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
247 {
248 &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).
249 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
250 },
251 ],
252 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
253 },
254 ],
255 &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.
256}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700257</div>
258
259<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 <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 -0700261 <pre>Retrieves the list of managed instance groups and groups them by zone.
262
263Args:
264 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 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 -0700266
Dan O'Mearadd494642020-05-01 07:42:23 -0700267For 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 -0700268
Dan O'Mearadd494642020-05-01 07:42:23 -0700269You 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 -0700270
Bu Sun Kim65020912020-05-20 12:08:20 -0700271To 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 -0700272 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 -0700273 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`)
274 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
275
276You 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.
277
278Currently, only sorting by `name` or `creationTimestamp desc` is supported.
279 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.
280 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 -0700281
282Returns:
283 An object of the form:
284
285 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800286 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
287 &quot;items&quot;: { # A list of InstanceGroupManagersScopedList resources.
288 &quot;a_key&quot;: { # [Output Only] The name of the scope that contains this set of managed instance groups.
289 &quot;instanceGroupManagers&quot;: [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
290 { # Represents a Managed Instance Group resource.
291 #
292 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
293 #
294 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
295 #
296 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
297 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800299 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
300 &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].
301 &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.
302 #
303 # 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.
304 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
305 #
306 #
307 # - If the value is fixed, then the calculated value is equal to the fixed value.
308 # - 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.
309 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
310 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
311 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 },
313 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800314 &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.
315 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
316 &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.
317 &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.
318 &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.
319 #
320 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
321 &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.
322 &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.
323 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
324 &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.
325 &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.
326 &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.
327 &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.
328 },
329 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
330 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
331 &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.
332 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
333 {
334 &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.
335 },
336 ],
337 },
338 &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.
339 &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.
340 #
341 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
342 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
343 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
344 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
345 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
346 &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.
347 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
348 { # The named port. For example: .
349 &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.
350 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
351 },
352 ],
353 &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.
354 &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.
355 &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.
356 &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.
357 &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.
358 },
359 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
360 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
361 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
362 &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.
363 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
364 &quot;preservedState&quot;: { # Configuration of preserved resources.
365 &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.
366 &quot;a_key&quot;: {
367 &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.
368 },
369 },
370 },
371 },
372 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
373 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
374 &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.
375 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
376 &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.
377 &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.
378 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
379 &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.
380 },
381 },
382 &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.
383 &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.
384 },
385 },
386 &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.
387 &quot;A String&quot;,
388 ],
389 &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.
390 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
391 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
392 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
393 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
394 &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.
395 #
396 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
397 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
398 #
399 #
400 # - If the value is fixed, then the calculated value is equal to the fixed value.
401 # - 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.
402 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
403 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
404 },
405 &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:
406 #
407 #
408 # - The instance&#x27;s status is RUNNING.
409 # - 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.
410 #
411 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
412 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
413 #
414 #
415 # - If the value is fixed, then the calculated value is equal to the fixed value.
416 # - 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.
417 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
418 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
419 },
420 &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].
421 &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.
422 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
423 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
424 &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).
425 },
426 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
427 #
428 # 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.
429 {
430 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
431 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
432 &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;.
433 &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:
434 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
435 # - 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.
436 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
437 #
438 #
439 # - If the value is fixed, then the calculated value is equal to the fixed value.
440 # - 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.
441 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
442 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
443 },
444 },
445 ],
446 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 },
448 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800449 &quot;warning&quot;: { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
450 &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.
451 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
452 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
453 {
454 &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).
455 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
456 },
457 ],
458 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
459 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800461 },
462 &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.
463 &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.
464 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
465 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
466 &quot;A String&quot;,
467 ],
468 &quot;warning&quot;: { # [Output Only] Informational warning message.
469 &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.
470 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
471 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
472 {
473 &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).
474 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
475 },
476 ],
477 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
478 },
479}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700480</div>
481
482<div class="method">
483 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
484 <pre>Retrieves the next page of results.
485
486Args:
487 previous_request: The request for the previous page. (required)
488 previous_response: The response from the request for the previous page. (required)
489
490Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700491 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700492 page. Returns None if there are no more items in the collection.
493 </pre>
494</div>
495
496<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700497 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</code>
498 <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 -0700499
500Args:
501 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700502 zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
503 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700504 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 The object takes the form of:
506
507{ # InstanceGroupManagers.applyUpdatesToInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800508 &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.
509 &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].
510 &quot;A String&quot;,
511 ],
512 &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.
513 &quot;minimalAction&quot;: &quot;A String&quot;, # The minimal action that you want to perform on each instance during the update:
514 # - REPLACE: At minimum, delete the instance and create it again.
515 # - RESTART: Stop the instance and start it again.
516 # - REFRESH: Do not stop the instance.
517 # - 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.
518 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # The most disruptive action that you want to perform on each instance during the update:
519 # - REPLACE: Delete the instance and create it again.
520 # - RESTART: Stop the instance and start it again.
521 # - REFRESH: Do not stop the instance.
522 # - 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.
523}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700524
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700525
526Returns:
527 An object of the form:
528
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800530 #
531 # Google Compute Engine has three Operation resources:
532 #
533 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
534 #
535 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
536 #
537 # Operations can be global, regional or zonal.
538 # - For global operations, use the `globalOperations` resource.
539 # - For regional operations, use the `regionOperations` resource.
540 # - For zonal operations, use the `zonalOperations` resource.
541 #
542 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
543 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
544 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
545 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
546 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
547 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
548 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800550 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
551 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
552 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700553 },
554 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800555 },
556 &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`.
557 &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.
558 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
559 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
560 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
561 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
562 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
563 &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.
564 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
565 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
566 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
567 &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.
568 &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`.
569 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
570 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
571 &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.
572 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
573 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
574 {
575 &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.
576 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
577 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
578 {
579 &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).
580 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
581 },
582 ],
583 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
584 },
585 ],
586 &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.
587}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700588</div>
589
590<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700591 <code class="details" id="close">close()</code>
592 <pre>Close httplib2 connections.</pre>
593</div>
594
595<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 <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.
598
599Args:
600 project: string, Project ID for this request. (required)
601 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
602 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 The object takes the form of:
605
606{ # InstanceGroupManagers.createInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800607 &quot;instances&quot;: [ # [Required] List of specifications of per-instance configs.
608 {
609 &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.
610 &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.
611 &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.
612 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
613 &quot;a_key&quot;: {
614 &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.
615 &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.
616 &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 -0700617 },
618 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800619 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
620 &quot;a_key&quot;: &quot;A String&quot;,
621 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800623 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
624 },
625 ],
626}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627
628 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.
629
630For 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.
631
632The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
633
634Returns:
635 An object of the form:
636
637 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800638 #
639 # Google Compute Engine has three Operation resources:
640 #
641 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
642 #
643 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
644 #
645 # Operations can be global, regional or zonal.
646 # - For global operations, use the `globalOperations` resource.
647 # - For regional operations, use the `regionOperations` resource.
648 # - For zonal operations, use the `zonalOperations` resource.
649 #
650 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
651 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
652 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
653 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
654 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
655 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
656 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800658 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
659 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
660 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 },
662 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800663 },
664 &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`.
665 &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.
666 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
667 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
668 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
669 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
670 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
671 &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.
672 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
673 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
674 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
675 &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.
676 &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`.
677 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
678 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
679 &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.
680 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
681 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
682 {
683 &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.
684 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
685 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
686 {
687 &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).
688 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
689 },
690 ],
691 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
692 },
693 ],
694 &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.
695}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696</div>
697
698<div class="method">
699 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
700 <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.
701
702Args:
703 project: string, Project ID for this request. (required)
704 zone: string, The name of the zone where the managed instance group is located. (required)
705 instanceGroupManager: string, The name of the managed instance group to delete. (required)
706 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.
707
708For 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.
709
710The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
711
712Returns:
713 An object of the form:
714
715 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800716 #
717 # Google Compute Engine has three Operation resources:
718 #
719 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
720 #
721 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
722 #
723 # Operations can be global, regional or zonal.
724 # - For global operations, use the `globalOperations` resource.
725 # - For regional operations, use the `regionOperations` resource.
726 # - For zonal operations, use the `zonalOperations` resource.
727 #
728 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
729 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
730 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
731 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
732 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
733 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
734 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800736 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
737 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
738 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 },
740 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800741 },
742 &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`.
743 &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.
744 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
745 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
746 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
747 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
748 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
749 &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.
750 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
751 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
752 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
753 &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.
754 &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`.
755 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
756 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
757 &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.
758 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
759 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
760 {
761 &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.
762 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
763 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
764 {
765 &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).
766 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
767 },
768 ],
769 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
770 },
771 ],
772 &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.
773}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700774</div>
775
776<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700777 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778 <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 -0700779
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400780If 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.
781
782You can specify a maximum of 1000 instances with this method per request.
783
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700784Args:
785 project: string, Project ID for this request. (required)
786 zone: string, The name of the zone where the managed instance group is located. (required)
787 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700788 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700789 The object takes the form of:
790
791{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800792 &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].
793 &quot;A String&quot;,
794 ],
795}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700796
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 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.
798
799For 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.
800
801The 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 -0700802
803Returns:
804 An object of the form:
805
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700806 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800807 #
808 # Google Compute Engine has three Operation resources:
809 #
810 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
811 #
812 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
813 #
814 # Operations can be global, regional or zonal.
815 # - For global operations, use the `globalOperations` resource.
816 # - For regional operations, use the `regionOperations` resource.
817 # - For zonal operations, use the `zonalOperations` resource.
818 #
819 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
820 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
821 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
822 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
823 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
824 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
825 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700826 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800827 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
828 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
829 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 },
831 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800832 },
833 &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`.
834 &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.
835 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
836 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
837 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
838 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
839 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
840 &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.
841 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
842 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
843 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
844 &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.
845 &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`.
846 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
847 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
848 &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.
849 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
850 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
851 {
852 &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.
853 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
854 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
855 {
856 &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).
857 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
858 },
859 ],
860 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
861 },
862 ],
863 &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.
864}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700865</div>
866
867<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700868 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869 <pre>Deletes selected per-instance configs for the managed instance group.
870
871Args:
872 project: string, Project ID for this request. (required)
873 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
874 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 The object takes the form of:
877
878{ # InstanceGroupManagers.deletePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800879 &quot;names&quot;: [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
880 &quot;A String&quot;,
881 ],
882}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883
884
885Returns:
886 An object of the form:
887
888 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800889 #
890 # Google Compute Engine has three Operation resources:
891 #
892 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
893 #
894 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
895 #
896 # Operations can be global, regional or zonal.
897 # - For global operations, use the `globalOperations` resource.
898 # - For regional operations, use the `regionOperations` resource.
899 # - For zonal operations, use the `zonalOperations` resource.
900 #
901 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
902 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
903 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
904 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
905 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
906 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
907 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800909 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
910 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
911 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700912 },
913 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800914 },
915 &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`.
916 &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.
917 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
918 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
919 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
920 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
921 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
922 &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.
923 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
924 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
925 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
926 &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.
927 &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`.
928 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
929 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
930 &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.
931 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
932 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
933 {
934 &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.
935 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
936 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
937 {
938 &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).
939 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
940 },
941 ],
942 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
943 },
944 ],
945 &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.
946}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700947</div>
948
949<div class="method">
950 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 <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 -0700952
953Args:
954 project: string, Project ID for this request. (required)
955 zone: string, The name of the zone where the managed instance group is located. (required)
956 instanceGroupManager: string, The name of the managed instance group. (required)
957
958Returns:
959 An object of the form:
960
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 { # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800962 #
963 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
964 #
965 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
966 #
967 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
968 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
969 {
970 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
971 &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].
972 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800973 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800974 # 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 -0700975 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
976 #
977 #
978 # - If the value is fixed, then the calculated value is equal to the fixed value.
979 # - 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.
980 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
981 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
982 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800983 },
984 ],
985 &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.
986 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
987 &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.
988 &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.
989 &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.
990 #
991 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
992 &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.
993 &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.
994 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
995 &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.
996 &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.
997 &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.
998 &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.
999 },
1000 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1001 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
1002 &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.
1003 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1004 {
1005 &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.
1006 },
1007 ],
1008 },
1009 &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.
1010 &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.
1011 #
1012 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1013 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1014 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1015 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
1016 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1017 &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.
1018 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1019 { # The named port. For example: .
1020 &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.
1021 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1022 },
1023 ],
1024 &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.
1025 &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.
1026 &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.
1027 &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.
1028 &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.
1029 },
1030 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1031 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1032 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1033 &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.
1034 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1035 &quot;preservedState&quot;: { # Configuration of preserved resources.
1036 &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.
1037 &quot;a_key&quot;: {
1038 &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.
1039 },
1040 },
1041 },
1042 },
1043 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1044 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1045 &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.
1046 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1047 &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.
1048 &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.
1049 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1050 &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.
1051 },
1052 },
1053 &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.
1054 &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.
1055 },
1056 },
1057 &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.
1058 &quot;A String&quot;,
1059 ],
1060 &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.
1061 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1062 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1063 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1064 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1065 &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.
1066 #
1067 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1068 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 #
1070 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001071 # - If the value is fixed, then the calculated value is equal to the fixed value.
1072 # - 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.
1073 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1074 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1075 },
1076 &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:
1077 #
1078 #
1079 # - The instance&#x27;s status is RUNNING.
1080 # - 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.
1081 #
1082 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1083 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim65020912020-05-20 12:08:20 -07001084 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001085 #
1086 # - If the value is fixed, then the calculated value is equal to the fixed value.
1087 # - 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.
1088 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1089 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1090 },
1091 &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].
1092 &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.
1093 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
1094 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1095 &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).
1096 },
1097 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1098 #
1099 # 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.
1100 {
1101 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
1102 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1103 &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;.
1104 &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:
1105 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1106 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001107 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1108 #
1109 #
1110 # - If the value is fixed, then the calculated value is equal to the fixed value.
1111 # - 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.
1112 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1113 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1114 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001115 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001116 ],
1117 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
1118}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001119</div>
1120
1121<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001122 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001123 <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.
1124
1125A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
1126
1127Args:
1128 project: string, Project ID for this request. (required)
1129 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 -07001130 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001131 The object takes the form of:
1132
1133{ # Represents a Managed Instance Group resource.
1134 #
1135 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1136 #
1137 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1138 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001139 # 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 -07001140 &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 -07001141 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001142 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1143 &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].
1144 &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 -07001145 #
1146 # 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 -07001147 &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 -07001148 #
1149 #
1150 # - If the value is fixed, then the calculated value is equal to the fixed value.
1151 # - 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 -07001152 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1153 &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 -07001154 },
1155 },
1156 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 &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.
1158 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1159 &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.
1160 &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.
1161 &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 -07001162 #
1163 # 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 -07001164 &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.
1165 &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.
1166 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1167 &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.
1168 &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.
1169 &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.
1170 &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 -07001171 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001172 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001173 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001175 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001176 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001177 &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 -07001178 },
1179 ],
1180 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001181 &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.
1182 &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.
1183 #
1184 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1185 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1186 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001187 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001188 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1189 &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.
1190 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1191 { # The named port. For example: .
1192 &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.
1193 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1194 },
1195 ],
1196 &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.
1197 &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.
1198 &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.
1199 &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.
1200 &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.
1201 },
1202 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1203 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1204 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1205 &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.
1206 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1207 &quot;preservedState&quot;: { # Configuration of preserved resources.
1208 &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.
1209 &quot;a_key&quot;: {
1210 &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 -07001211 },
1212 },
1213 },
1214 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001215 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1216 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1217 &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.
1218 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1219 &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.
1220 &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 -07001221 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1222 &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.
1223 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001224 },
1225 &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.
1226 &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.
1227 },
1228 },
1229 &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.
1230 &quot;A String&quot;,
1231 ],
1232 &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.
1233 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1234 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1235 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1236 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1237 &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.
1238 #
1239 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1240 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1241 #
1242 #
1243 # - If the value is fixed, then the calculated value is equal to the fixed value.
1244 # - 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.
1245 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1246 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1247 },
1248 &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:
1249 #
1250 #
1251 # - The instance&#x27;s status is RUNNING.
1252 # - 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.
1253 #
1254 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1255 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1256 #
1257 #
1258 # - If the value is fixed, then the calculated value is equal to the fixed value.
1259 # - 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.
1260 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1261 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1262 },
1263 &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].
1264 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001265 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1267 &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).
1268 },
1269 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1270 #
1271 # 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.
1272 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001273 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
Bu Sun Kim65020912020-05-20 12:08:20 -07001274 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1275 &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;.
1276 &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:
1277 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1278 # - 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.
1279 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1280 #
1281 #
1282 # - If the value is fixed, then the calculated value is equal to the fixed value.
1283 # - 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.
1284 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1285 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1286 },
1287 },
1288 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001289 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001291
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 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.
1293
1294For 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.
1295
1296The 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 -07001297
1298Returns:
1299 An object of the form:
1300
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001301 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001302 #
1303 # Google Compute Engine has three Operation resources:
1304 #
1305 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1306 #
1307 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1308 #
1309 # Operations can be global, regional or zonal.
1310 # - For global operations, use the `globalOperations` resource.
1311 # - For regional operations, use the `regionOperations` resource.
1312 # - For zonal operations, use the `zonalOperations` resource.
1313 #
1314 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1315 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1316 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1317 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1318 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1319 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1320 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001322 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1323 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1324 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001325 },
1326 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001327 },
1328 &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`.
1329 &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.
1330 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1331 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1332 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1333 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1334 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1335 &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.
1336 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1337 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1338 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1339 &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.
1340 &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`.
1341 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1342 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1343 &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.
1344 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1345 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1346 {
1347 &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.
1348 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1349 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1350 {
1351 &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).
1352 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1353 },
1354 ],
1355 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1356 },
1357 ],
1358 &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.
1359}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001360</div>
1361
1362<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001363 <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 -07001364 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1365
1366Args:
1367 project: string, Project ID for this request. (required)
1368 zone: string, The name of the zone where the managed instance group is located. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001369 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 -07001370
Dan O'Mearadd494642020-05-01 07:42:23 -07001371For 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 -07001372
Dan O'Mearadd494642020-05-01 07:42:23 -07001373You 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 -07001374
Bu Sun Kim65020912020-05-20 12:08:20 -07001375To 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) ```
1376 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`)
1377 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1378
1379You 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.
1380
1381Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1382 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.
1383 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 -07001384
1385Returns:
1386 An object of the form:
1387
1388 { # [Output Only] A list of managed instance groups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001389 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1390 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
1391 { # Represents a Managed Instance Group resource.
1392 #
1393 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1394 #
1395 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1396 #
1397 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1398 &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 -07001399 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001400 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1401 &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].
1402 &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.
1403 #
1404 # 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.
1405 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1406 #
1407 #
1408 # - If the value is fixed, then the calculated value is equal to the fixed value.
1409 # - 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.
1410 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1411 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1412 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 },
1414 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001415 &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.
1416 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1417 &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.
1418 &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.
1419 &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.
1420 #
1421 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1422 &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.
1423 &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.
1424 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1425 &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.
1426 &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.
1427 &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.
1428 &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.
1429 },
1430 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1431 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
1432 &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.
1433 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1434 {
1435 &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.
1436 },
1437 ],
1438 },
1439 &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.
1440 &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.
1441 #
1442 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1443 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1444 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1445 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
1446 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1447 &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.
1448 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1449 { # The named port. For example: .
1450 &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.
1451 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1452 },
1453 ],
1454 &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.
1455 &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.
1456 &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.
1457 &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.
1458 &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.
1459 },
1460 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1461 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1462 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1463 &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.
1464 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1465 &quot;preservedState&quot;: { # Configuration of preserved resources.
1466 &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.
1467 &quot;a_key&quot;: {
1468 &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.
1469 },
1470 },
1471 },
1472 },
1473 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1474 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1475 &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.
1476 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1477 &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.
1478 &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.
1479 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1480 &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.
1481 },
1482 },
1483 &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.
1484 &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.
1485 },
1486 },
1487 &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.
1488 &quot;A String&quot;,
1489 ],
1490 &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.
1491 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1492 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1493 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1494 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1495 &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.
1496 #
1497 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1498 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1499 #
1500 #
1501 # - If the value is fixed, then the calculated value is equal to the fixed value.
1502 # - 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.
1503 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1504 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1505 },
1506 &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:
1507 #
1508 #
1509 # - The instance&#x27;s status is RUNNING.
1510 # - 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.
1511 #
1512 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1513 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1514 #
1515 #
1516 # - If the value is fixed, then the calculated value is equal to the fixed value.
1517 # - 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.
1518 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1519 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1520 },
1521 &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].
1522 &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.
1523 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
1524 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1525 &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).
1526 },
1527 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1528 #
1529 # 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.
1530 {
1531 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
1532 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1533 &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;.
1534 &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:
1535 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1536 # - 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.
1537 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1538 #
1539 #
1540 # - If the value is fixed, then the calculated value is equal to the fixed value.
1541 # - 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.
1542 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1543 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1544 },
1545 },
1546 ],
1547 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001548 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001549 ],
1550 &quot;kind&quot;: &quot;compute#instanceGroupManagerList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1551 &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.
1552 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1553 &quot;warning&quot;: { # [Output Only] Informational warning message.
1554 &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.
1555 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1556 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1557 {
1558 &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).
1559 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1560 },
1561 ],
1562 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1563 },
1564}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001565</div>
1566
1567<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001568 <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 -07001569 <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 -07001570
1571Args:
1572 project: string, Project ID for this request. (required)
1573 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1574 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 -07001575 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 -07001576
Dan O'Mearadd494642020-05-01 07:42:23 -07001577For 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 -07001578
Dan O'Mearadd494642020-05-01 07:42:23 -07001579You 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 -07001580
Bu Sun Kim65020912020-05-20 12:08:20 -07001581To 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) ```
1582 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`)
1583 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1584
1585You 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.
1586
1587Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1588 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.
1589 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 -07001590
1591Returns:
1592 An object of the form:
1593
1594 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001595 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
1596 {
1597 &quot;error&quot;: { # [Output Only] Contents of the error.
1598 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1599 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001600 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001601 &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.
1602 &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:
1603 &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.
1604 &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.
1605 &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 }.
1606 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1607 },
1608 },
1609 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1610 },
1611 ],
1612 &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.
1613}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001614</div>
1615
1616<div class="method">
1617 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1618 <pre>Retrieves the next page of results.
1619
1620Args:
1621 previous_request: The request for the previous page. (required)
1622 previous_response: The response from the request for the previous page. (required)
1623
1624Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001625 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626 page. Returns None if there are no more items in the collection.
1627 </pre>
1628</div>
1629
1630<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001631 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
1632 <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 -07001633
1634Args:
1635 project: string, Project ID for this request. (required)
1636 zone: string, The name of the zone where the managed instance group is located. (required)
1637 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001638 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 -07001639
Dan O'Mearadd494642020-05-01 07:42:23 -07001640For 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 -07001641
Dan O'Mearadd494642020-05-01 07:42:23 -07001642You 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 -07001643
Bu Sun Kim65020912020-05-20 12:08:20 -07001644To 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) ```
1645 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`)
1646 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1647
1648You 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.
1649
1650Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1651 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 -07001652 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 -07001653
1654Returns:
1655 An object of the form:
1656
1657 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001658 &quot;managedInstances&quot;: [ # [Output Only] The list of instances in the managed instance group.
1659 { # A Managed Instance resource.
1660 &quot;currentAction&quot;: &quot;A String&quot;, # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1661 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1662 # - 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.
1663 # - 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.
1664 # - RECREATING The managed instance group is recreating this instance.
1665 # - DELETING The managed instance group is permanently deleting this instance.
1666 # - 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.
1667 # - RESTARTING The managed instance group is restarting the instance.
1668 # - 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.
1669 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
1670 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1671 &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.
1672 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1673 {
1674 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1675 &quot;healthCheck&quot;: &quot;A String&quot;, # [Output Only] The URL for the health check that verifies whether the instance is healthy.
1676 &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 -07001677 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001678 ],
1679 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1680 &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 }.
1681 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1682 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1683 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1684 {
1685 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1686 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1687 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001688 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001689 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001690 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001691 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001692 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config 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;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1705 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1706 &quot;a_key&quot;: {
1707 &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.
1708 &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.
1709 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1710 },
1711 },
1712 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1713 &quot;a_key&quot;: &quot;A String&quot;,
1714 },
1715 },
1716 &quot;tag&quot;: &quot;A String&quot;, # [Output Only] Tag describing the version.
1717 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1718 &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 }.
1719 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1720 },
1721 },
1722 ],
1723 &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.
1724}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001725</div>
1726
1727<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001728 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1729 <pre>Retrieves the next page of results.
1730
1731Args:
1732 previous_request: The request for the previous page. (required)
1733 previous_response: The response from the request for the previous page. (required)
1734
1735Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001736 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001737 page. Returns None if there are no more items in the collection.
1738 </pre>
1739</div>
1740
1741<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001742 <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 -07001743 <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 -07001744
1745Args:
1746 project: string, Project ID for this request. (required)
1747 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1748 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001749 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 -07001750
Dan O'Mearadd494642020-05-01 07:42:23 -07001751For 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 -07001752
Dan O'Mearadd494642020-05-01 07:42:23 -07001753You 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 -07001754
Bu Sun Kim65020912020-05-20 12:08:20 -07001755To 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) ```
1756 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`)
1757 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1758
1759You 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.
1760
1761Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1762 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.
1763 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 -07001764
1765Returns:
1766 An object of the form:
1767
1768 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001769 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
1770 {
1771 &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.
1772 &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.
1773 &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.
1774 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1775 &quot;a_key&quot;: {
1776 &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.
1777 &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.
1778 &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 -07001779 },
1780 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001781 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1782 &quot;a_key&quot;: &quot;A String&quot;,
1783 },
1784 },
1785 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1786 },
1787 ],
1788 &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.
1789 &quot;warning&quot;: { # [Output Only] Informational warning message.
1790 &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.
1791 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1792 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1793 {
1794 &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).
1795 &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 -07001796 },
1797 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001798 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1799 },
1800}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001801</div>
1802
1803<div class="method">
1804 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1805 <pre>Retrieves the next page of results.
1806
1807Args:
1808 previous_request: The request for the previous page. (required)
1809 previous_response: The response from the request for the previous page. (required)
1810
1811Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001812 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001813 page. Returns None if there are no more items in the collection.
1814 </pre>
1815</div>
1816
1817<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001818 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1819 <pre>Retrieves the next page of results.
1820
1821Args:
1822 previous_request: The request for the previous page. (required)
1823 previous_response: The response from the request for the previous page. (required)
1824
1825Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001827 page. Returns None if there are no more items in the collection.
1828 </pre>
1829</div>
1830
1831<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001832 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001833 <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 -07001834
1835Args:
1836 project: string, Project ID for this request. (required)
1837 zone: string, The name of the zone where you want to create the managed instance group. (required)
1838 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001839 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001840 The object takes the form of:
1841
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001842{ # Represents a Managed Instance Group resource.
1843 #
1844 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1845 #
1846 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1847 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001848 # 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 -07001849 &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 -07001850 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001851 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1852 &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].
1853 &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 -07001854 #
1855 # 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 -07001856 &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 -07001857 #
1858 #
1859 # - If the value is fixed, then the calculated value is equal to the fixed value.
1860 # - 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 -07001861 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1862 &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 -07001863 },
1864 },
1865 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001866 &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.
1867 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1868 &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.
1869 &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.
1870 &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 -07001871 #
1872 # 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 -07001873 &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.
1874 &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.
1875 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1876 &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.
1877 &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.
1878 &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.
1879 &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 -07001880 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001881 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001882 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -07001883 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001884 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001885 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001886 &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 -08001887 },
1888 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001889 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001890 &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.
1891 &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.
1892 #
1893 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1894 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1895 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001896 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001897 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1898 &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.
1899 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1900 { # The named port. For example: .
1901 &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.
1902 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1903 },
1904 ],
1905 &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.
1906 &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.
1907 &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.
1908 &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.
1909 &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.
1910 },
1911 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1912 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1913 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1914 &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.
1915 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1916 &quot;preservedState&quot;: { # Configuration of preserved resources.
1917 &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.
1918 &quot;a_key&quot;: {
1919 &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 -07001920 },
1921 },
1922 },
1923 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001924 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1925 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1926 &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.
1927 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1928 &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.
1929 &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 -07001930 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1931 &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.
1932 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001933 },
1934 &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.
1935 &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.
1936 },
1937 },
1938 &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.
1939 &quot;A String&quot;,
1940 ],
1941 &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.
1942 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1943 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1944 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1945 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1946 &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.
1947 #
1948 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1949 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1950 #
1951 #
1952 # - If the value is fixed, then the calculated value is equal to the fixed value.
1953 # - 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.
1954 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1955 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1956 },
1957 &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:
1958 #
1959 #
1960 # - The instance&#x27;s status is RUNNING.
1961 # - 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.
1962 #
1963 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1964 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1965 #
1966 #
1967 # - If the value is fixed, then the calculated value is equal to the fixed value.
1968 # - 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.
1969 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1970 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1971 },
1972 &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].
1973 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001974 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Bu Sun Kim65020912020-05-20 12:08:20 -07001975 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1976 &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).
1977 },
1978 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1979 #
1980 # 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.
1981 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001982 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
Bu Sun Kim65020912020-05-20 12:08:20 -07001983 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1984 &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;.
1985 &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:
1986 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1987 # - 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.
1988 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1989 #
1990 #
1991 # - If the value is fixed, then the calculated value is equal to the fixed value.
1992 # - 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.
1993 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1994 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1995 },
1996 },
1997 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001998 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001999}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002001 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.
2002
2003For 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.
2004
2005The 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 -07002006
2007Returns:
2008 An object of the form:
2009
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002010 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002011 #
2012 # Google Compute Engine has three Operation resources:
2013 #
2014 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2015 #
2016 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2017 #
2018 # Operations can be global, regional or zonal.
2019 # - For global operations, use the `globalOperations` resource.
2020 # - For regional operations, use the `regionOperations` resource.
2021 # - For zonal operations, use the `zonalOperations` resource.
2022 #
2023 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2024 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2025 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2026 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2027 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2028 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2029 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002030 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002031 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2032 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2033 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002034 },
2035 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002036 },
2037 &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`.
2038 &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.
2039 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2040 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2041 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2042 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2043 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2044 &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.
2045 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2046 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2047 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2048 &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.
2049 &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`.
2050 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2051 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2052 &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.
2053 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2054 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2055 {
2056 &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.
2057 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2058 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2059 {
2060 &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).
2061 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2062 },
2063 ],
2064 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2065 },
2066 ],
2067 &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.
2068}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002069</div>
2070
2071<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002072 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2073 <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 -07002074
2075Args:
2076 project: string, Project ID for this request. (required)
2077 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2078 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002079 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002080 The object takes the form of:
2081
2082{ # InstanceGroupManagers.patchPerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002083 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
2084 {
2085 &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.
2086 &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.
2087 &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.
2088 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2089 &quot;a_key&quot;: {
2090 &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.
2091 &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.
2092 &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 -07002093 },
2094 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002095 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2096 &quot;a_key&quot;: &quot;A String&quot;,
2097 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002098 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002099 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
2100 },
2101 ],
2102}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002103
2104 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.
2105
2106For 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.
2107
2108The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2109
2110Returns:
2111 An object of the form:
2112
2113 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002114 #
2115 # Google Compute Engine has three Operation resources:
2116 #
2117 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2118 #
2119 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2120 #
2121 # Operations can be global, regional or zonal.
2122 # - For global operations, use the `globalOperations` resource.
2123 # - For regional operations, use the `regionOperations` resource.
2124 # - For zonal operations, use the `zonalOperations` resource.
2125 #
2126 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2127 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2128 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2129 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2130 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2131 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2132 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002133 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002134 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2135 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2136 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002137 },
2138 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002139 },
2140 &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`.
2141 &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.
2142 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2143 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2144 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2145 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2146 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2147 &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.
2148 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2149 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2150 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2151 &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.
2152 &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`.
2153 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2154 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2155 &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.
2156 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2157 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2158 {
2159 &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.
2160 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2161 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2162 {
2163 &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).
2164 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2165 },
2166 ],
2167 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2168 },
2169 ],
2170 &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.
2171}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002172</div>
2173
2174<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002175 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002176 <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 -07002177
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002178If 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.
2179
2180You can specify a maximum of 1000 instances with this method per request.
2181
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002182Args:
2183 project: string, Project ID for this request. (required)
2184 zone: string, The name of the zone where the managed instance group is located. (required)
2185 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002186 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002187 The object takes the form of:
2188
2189{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002190 &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].
2191 &quot;A String&quot;,
2192 ],
2193}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002194
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002195 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.
2196
2197For 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.
2198
2199The 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 -07002200
2201Returns:
2202 An object of the form:
2203
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002204 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002205 #
2206 # Google Compute Engine has three Operation resources:
2207 #
2208 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2209 #
2210 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2211 #
2212 # Operations can be global, regional or zonal.
2213 # - For global operations, use the `globalOperations` resource.
2214 # - For regional operations, use the `regionOperations` resource.
2215 # - For zonal operations, use the `zonalOperations` resource.
2216 #
2217 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2218 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2219 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2220 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2221 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2222 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2223 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002224 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002225 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2226 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2227 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002228 },
2229 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002230 },
2231 &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`.
2232 &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.
2233 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2234 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2235 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2236 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2237 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2238 &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.
2239 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2240 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2241 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2242 &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.
2243 &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`.
2244 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2245 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2246 &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.
2247 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2248 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2249 {
2250 &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.
2251 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2252 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2253 {
2254 &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).
2255 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2256 },
2257 ],
2258 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2259 },
2260 ],
2261 &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.
2262}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002263</div>
2264
2265<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002266 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002267 <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.
2268
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002269When 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:
2270
2271+ 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.
2272
2273This list is subject to change.
2274
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002275If 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.
2276
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002277Args:
2278 project: string, Project ID for this request. (required)
2279 zone: string, The name of the zone where the managed instance group is located. (required)
2280 instanceGroupManager: string, The name of the managed instance group. (required)
2281 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 -07002282 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.
2283
2284For 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.
2285
2286The 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 -07002287
2288Returns:
2289 An object of the form:
2290
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002291 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002292 #
2293 # Google Compute Engine has three Operation resources:
2294 #
2295 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2296 #
2297 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2298 #
2299 # Operations can be global, regional or zonal.
2300 # - For global operations, use the `globalOperations` resource.
2301 # - For regional operations, use the `regionOperations` resource.
2302 # - For zonal operations, use the `zonalOperations` resource.
2303 #
2304 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2305 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2306 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2307 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2308 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2309 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2310 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002311 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002312 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2313 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2314 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002315 },
2316 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002317 },
2318 &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`.
2319 &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.
2320 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2321 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2322 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2323 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2324 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2325 &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.
2326 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2327 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2328 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2329 &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.
2330 &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`.
2331 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2332 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2333 &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.
2334 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2335 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2336 {
2337 &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.
2338 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2339 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2340 {
2341 &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).
2342 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2343 },
2344 ],
2345 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2346 },
2347 ],
2348 &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.
2349}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002350</div>
2351
2352<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002353 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002354 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
2355
2356If 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.
2357
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002358If 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.
2359
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002360Args:
2361 project: string, Project ID for this request. (required)
2362 zone: string, The name of the zone where the managed instance group is located. (required)
2363 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002364 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002365 The object takes the form of:
2366
2367{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002368 &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.
2369 #
2370 # 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.
2371 #
2372 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
2373 #
2374 # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
2375 &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.
2376}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002377
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002378 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.
2379
2380For 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.
2381
2382The 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 -07002383
2384Returns:
2385 An object of the form:
2386
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002387 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002388 #
2389 # Google Compute Engine has three Operation resources:
2390 #
2391 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2392 #
2393 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2394 #
2395 # Operations can be global, regional or zonal.
2396 # - For global operations, use the `globalOperations` resource.
2397 # - For regional operations, use the `regionOperations` resource.
2398 # - For zonal operations, use the `zonalOperations` resource.
2399 #
2400 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2401 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2402 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2403 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2404 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2405 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2406 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002407 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002408 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2409 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2410 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002411 },
2412 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002413 },
2414 &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`.
2415 &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.
2416 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2417 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2418 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2419 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2420 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2421 &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.
2422 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2423 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2424 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2425 &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.
2426 &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`.
2427 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2428 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2429 &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.
2430 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2431 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2432 {
2433 &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.
2434 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2435 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2436 {
2437 &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).
2438 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2439 },
2440 ],
2441 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2442 },
2443 ],
2444 &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.
2445}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002446</div>
2447
2448<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002449 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002450 <pre>Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002451
2452Args:
2453 project: string, Project ID for this request. (required)
2454 zone: string, The name of the zone where the managed instance group is located. (required)
2455 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002456 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002457 The object takes the form of:
2458
2459{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002460 &quot;autoHealingPolicies&quot;: [
2461 {
2462 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2463 &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].
2464 &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.
2465 #
2466 # 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.
2467 &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 -07002468 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002469 #
2470 # - If the value is fixed, then the calculated value is equal to the fixed value.
2471 # - 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.
2472 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2473 &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 -07002474 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002475 },
2476 ],
2477}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002478
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002479 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.
2480
2481For 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.
2482
2483The 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 -07002484
2485Returns:
2486 An object of the form:
2487
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002488 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002489 #
2490 # Google Compute Engine has three Operation resources:
2491 #
2492 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2493 #
2494 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2495 #
2496 # Operations can be global, regional or zonal.
2497 # - For global operations, use the `globalOperations` resource.
2498 # - For regional operations, use the `regionOperations` resource.
2499 # - For zonal operations, use the `zonalOperations` resource.
2500 #
2501 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2502 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2503 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2504 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2505 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2506 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2507 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002508 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002509 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2510 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2511 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002512 },
2513 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002514 },
2515 &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`.
2516 &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.
2517 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2518 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2519 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2520 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2521 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2522 &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.
2523 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2524 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2525 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2526 &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.
2527 &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`.
2528 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2529 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2530 &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.
2531 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2532 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2533 {
2534 &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.
2535 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2536 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2537 {
2538 &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).
2539 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2540 },
2541 ],
2542 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2543 },
2544 ],
2545 &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.
2546}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002547</div>
2548
2549<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002550 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002551 <pre>Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002552
2553Args:
2554 project: string, Project ID for this request. (required)
2555 zone: string, The name of the zone where the managed instance group is located. (required)
2556 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002557 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002558 The object takes the form of:
2559
2560{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002561 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
2562}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002563
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002564 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.
2565
2566For 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.
2567
2568The 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 -07002569
2570Returns:
2571 An object of the form:
2572
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002573 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002574 #
2575 # Google Compute Engine has three Operation resources:
2576 #
2577 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2578 #
2579 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2580 #
2581 # Operations can be global, regional or zonal.
2582 # - For global operations, use the `globalOperations` resource.
2583 # - For regional operations, use the `regionOperations` resource.
2584 # - For zonal operations, use the `zonalOperations` resource.
2585 #
2586 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2587 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2588 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2589 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2590 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2591 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2592 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002593 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002594 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2595 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2596 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002597 },
2598 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002599 },
2600 &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`.
2601 &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.
2602 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2603 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2604 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2605 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2606 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2607 &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.
2608 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2609 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2610 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2611 &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.
2612 &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`.
2613 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2614 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2615 &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.
2616 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2617 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2618 {
2619 &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.
2620 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2621 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2622 {
2623 &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).
2624 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2625 },
2626 ],
2627 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2628 },
2629 ],
2630 &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.
2631}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002632</div>
2633
2634<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002635 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002636 <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.
2637
2638Args:
2639 project: string, Project ID for this request. (required)
2640 zone: string, The name of the zone where the managed instance group is located. (required)
2641 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002642 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002643 The object takes the form of:
2644
2645{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002646 &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.
2647 &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.
2648 &quot;A String&quot;,
2649 ],
2650}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002651
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002652 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.
2653
2654For 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.
2655
2656The 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 -07002657
2658Returns:
2659 An object of the form:
2660
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002661 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002662 #
2663 # Google Compute Engine has three Operation resources:
2664 #
2665 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2666 #
2667 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2668 #
2669 # Operations can be global, regional or zonal.
2670 # - For global operations, use the `globalOperations` resource.
2671 # - For regional operations, use the `regionOperations` resource.
2672 # - For zonal operations, use the `zonalOperations` resource.
2673 #
2674 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2675 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2676 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2677 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2678 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2679 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2680 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002681 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002682 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2683 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2684 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002685 },
2686 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002687 },
2688 &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`.
2689 &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.
2690 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2691 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2692 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2693 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2694 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2695 &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.
2696 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2697 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2698 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2699 &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.
2700 &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`.
2701 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2702 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2703 &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.
2704 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2705 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2706 {
2707 &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.
2708 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2709 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2710 {
2711 &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).
2712 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2713 },
2714 ],
2715 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2716 },
2717 ],
2718 &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.
2719}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002720</div>
2721
2722<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002723 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002724 <pre>Returns permissions that a caller has on the specified resource.
2725
2726Args:
2727 project: string, Project ID for this request. (required)
2728 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002729 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002730 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002731 The object takes the form of:
2732
2733{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002734 &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.
2735 &quot;A String&quot;,
2736 ],
2737}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002738
2739
2740Returns:
2741 An object of the form:
2742
2743 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002744 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2745 &quot;A String&quot;,
2746 ],
2747}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002748</div>
2749
2750<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002751 <code class="details" id="update">update(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002752 <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 -07002753
2754Args:
2755 project: string, Project ID for this request. (required)
2756 zone: string, The name of the zone where you want to create the managed instance group. (required)
2757 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002758 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002759 The object takes the form of:
2760
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002761{ # Represents a Managed Instance Group resource.
2762 #
2763 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2764 #
2765 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2766 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002767 # 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 -07002768 &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 -07002769 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002770 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2771 &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].
2772 &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 -07002773 #
2774 # 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 -07002775 &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 -07002776 #
2777 #
2778 # - If the value is fixed, then the calculated value is equal to the fixed value.
2779 # - 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 -07002780 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2781 &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 -07002782 },
2783 },
2784 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002785 &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.
2786 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2787 &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.
2788 &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.
2789 &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 -07002790 #
2791 # 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 -07002792 &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.
2793 &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.
2794 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2795 &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.
2796 &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.
2797 &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.
2798 &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 -07002799 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002800 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002801 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -07002802 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002803 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002804 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002805 &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 -08002806 },
2807 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002808 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002809 &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.
2810 &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.
2811 #
2812 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2813 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2814 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002815 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Bu Sun Kim65020912020-05-20 12:08:20 -07002816 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2817 &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.
2818 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2819 { # The named port. For example: .
2820 &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.
2821 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
2822 },
2823 ],
2824 &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.
2825 &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.
2826 &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.
2827 &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.
2828 &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.
2829 },
2830 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2831 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
2832 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2833 &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.
2834 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
2835 &quot;preservedState&quot;: { # Configuration of preserved resources.
2836 &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.
2837 &quot;a_key&quot;: {
2838 &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 -07002839 },
2840 },
2841 },
2842 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002843 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
2844 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
2845 &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.
2846 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
2847 &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.
2848 &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 -07002849 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
2850 &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.
2851 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002852 },
2853 &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.
2854 &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.
2855 },
2856 },
2857 &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.
2858 &quot;A String&quot;,
2859 ],
2860 &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.
2861 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
2862 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
2863 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
2864 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
2865 &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.
2866 #
2867 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2868 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2869 #
2870 #
2871 # - If the value is fixed, then the calculated value is equal to the fixed value.
2872 # - 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.
2873 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2874 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2875 },
2876 &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:
2877 #
2878 #
2879 # - The instance&#x27;s status is RUNNING.
2880 # - 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.
2881 #
2882 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2883 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2884 #
2885 #
2886 # - If the value is fixed, then the calculated value is equal to the fixed value.
2887 # - 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.
2888 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2889 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2890 },
2891 &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].
2892 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002893 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Bu Sun Kim65020912020-05-20 12:08:20 -07002894 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
2895 &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).
2896 },
2897 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
2898 #
2899 # 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.
2900 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002901 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
Bu Sun Kim65020912020-05-20 12:08:20 -07002902 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
2903 &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;.
2904 &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:
2905 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2906 # - 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.
2907 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2908 #
2909 #
2910 # - If the value is fixed, then the calculated value is equal to the fixed value.
2911 # - 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.
2912 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2913 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2914 },
2915 },
2916 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002917 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002918}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002919
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002920 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.
2921
2922For 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.
2923
2924The 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 -07002925
2926Returns:
2927 An object of the form:
2928
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002929 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002930 #
2931 # Google Compute Engine has three Operation resources:
2932 #
2933 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2934 #
2935 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2936 #
2937 # Operations can be global, regional or zonal.
2938 # - For global operations, use the `globalOperations` resource.
2939 # - For regional operations, use the `regionOperations` resource.
2940 # - For zonal operations, use the `zonalOperations` resource.
2941 #
2942 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2943 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2944 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2945 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2946 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2947 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2948 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002949 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002950 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2951 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2952 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002953 },
2954 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002955 },
2956 &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`.
2957 &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.
2958 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2959 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2960 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2961 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2962 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2963 &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.
2964 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2965 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2966 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2967 &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.
2968 &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`.
2969 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2970 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2971 &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.
2972 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2973 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2974 {
2975 &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.
2976 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2977 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2978 {
2979 &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).
2980 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2981 },
2982 ],
2983 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2984 },
2985 ],
2986 &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.
2987}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002988</div>
2989
2990<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002991 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2992 <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 -07002993
2994Args:
2995 project: string, Project ID for this request. (required)
2996 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2997 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002998 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002999 The object takes the form of:
3000
3001{ # InstanceGroupManagers.updatePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003002 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
3003 {
3004 &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.
3005 &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.
3006 &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.
3007 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
3008 &quot;a_key&quot;: {
3009 &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.
3010 &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.
3011 &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 -07003012 },
3013 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003014 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
3015 &quot;a_key&quot;: &quot;A String&quot;,
3016 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003017 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003018 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
3019 },
3020 ],
3021}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003022
3023 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.
3024
3025For 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.
3026
3027The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3028
3029Returns:
3030 An object of the form:
3031
3032 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003033 #
3034 # Google Compute Engine has three Operation resources:
3035 #
3036 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3037 #
3038 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3039 #
3040 # Operations can be global, regional or zonal.
3041 # - For global operations, use the `globalOperations` resource.
3042 # - For regional operations, use the `regionOperations` resource.
3043 # - For zonal operations, use the `zonalOperations` resource.
3044 #
3045 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3046 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3047 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3048 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3049 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3050 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3051 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003052 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003053 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3054 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3055 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003056 },
3057 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003058 },
3059 &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`.
3060 &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.
3061 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3062 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3063 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3064 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3065 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3066 &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.
3067 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3068 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3069 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3070 &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.
3071 &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`.
3072 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3073 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3074 &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.
3075 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3076 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3077 {
3078 &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.
3079 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3080 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3081 {
3082 &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).
3083 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3084 },
3085 ],
3086 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3087 },
3088 ],
3089 &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.
3090}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003091</div>
3092
3093</body></html>