blob: 9a684408c687c159a13c988dfcf846f769604854 [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>
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400142<p class="firstline">Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. 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 each instance by checking its currentAction field; for more information, see Checking the status of managed instances.</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">
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700150 <code><a href="#resumeInstances">resumeInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
151<p class="firstline">Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method.</p>
152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800154<p class="firstline">Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead.</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="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700157<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 -0700158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160<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>
161<p class="toc_element">
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700162 <code><a href="#startInstances">startInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
163<p class="firstline">Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method.</p>
164<p class="toc_element">
165 <code><a href="#stopInstances">stopInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
166<p class="firstline">Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method.</p>
167<p class="toc_element">
168 <code><a href="#suspendInstances">suspendInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
169<p class="firstline">Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method.</p>
170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
173<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 <code><a href="#update">update(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400175<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 -0700176<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
178<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 -0700179<h3>Method Details</h3>
180<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 <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 -0700183
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400184If 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.
185
186You can specify a maximum of 1000 instances with this method per request.
187
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188Args:
189 project: string, Project ID for this request. (required)
190 zone: string, The name of the zone where the managed instance group is located. (required)
191 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700193 The object takes the form of:
194
195{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800196 &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].
197 &quot;A String&quot;,
198 ],
199}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 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.
202
203For 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.
204
205The 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 -0700206
207Returns:
208 An object of the form:
209
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800211 #
212 # Google Compute Engine has three Operation resources:
213 #
214 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
215 #
216 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
217 #
218 # Operations can be global, regional or zonal.
219 # - For global operations, use the `globalOperations` resource.
220 # - For regional operations, use the `regionOperations` resource.
221 # - For zonal operations, use the `zonalOperations` resource.
222 #
223 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
224 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
225 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
226 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
227 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
228 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
229 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800231 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
232 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
233 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 },
235 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800236 },
237 &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`.
238 &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.
239 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
240 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
241 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
242 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800243 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
245 &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.
246 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
247 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
248 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
249 &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.
250 &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`.
251 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
252 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
253 &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.
254 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
255 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
256 {
257 &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.
258 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
259 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
260 {
261 &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).
262 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
263 },
264 ],
265 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
266 },
267 ],
268 &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.
269}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700270</div>
271
272<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700273 <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 -0700274 <pre>Retrieves the list of managed instance groups and groups them by zone.
275
276Args:
277 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700278 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 -0700279
Dan O'Mearadd494642020-05-01 07:42:23 -0700280For 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 -0700281
Dan O'Mearadd494642020-05-01 07:42:23 -0700282You 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 -0700283
Bu Sun Kim65020912020-05-20 12:08:20 -0700284To 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 -0700285 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 -0700286 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`)
287 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
288
289You 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.
290
291Currently, only sorting by `name` or `creationTimestamp desc` is supported.
292 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800293 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700294
295Returns:
296 An object of the form:
297
298 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800299 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
300 &quot;items&quot;: { # A list of InstanceGroupManagersScopedList resources.
301 &quot;a_key&quot;: { # [Output Only] The name of the scope that contains this set of managed instance groups.
302 &quot;instanceGroupManagers&quot;: [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700303 { # Whether the instance is a standby. Properties of a standby instance comparing to the regular instance: ========================================================================= | regular | standby ========================================================================= managed by IGM? | yes | yes added to the IG? | yes | yes counts towards IGM&#x27;s target size? | yes | no taken into account by Autoscaler? | yes | no receives traffic from LB? | yes | no =========================================================================
304 #
305 # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800306 #
307 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
308 #
309 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
310 #
311 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
312 &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 -0700313 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800314 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
315 &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].
316 &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.
317 #
318 # 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.
319 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
320 #
321 #
322 # - If the value is fixed, then the calculated value is equal to the fixed value.
323 # - 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.
324 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
325 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
326 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700327 },
328 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800329 &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.
330 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
331 &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.
332 &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.
333 &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.
334 #
335 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
336 &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.
337 &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.
338 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
339 &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.
340 &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.
341 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700342 &quot;resuming&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.
343 &quot;starting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.
344 &quot;stopping&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.
345 &quot;suspending&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800346 &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.
347 },
348 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
349 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800350 &quot;targetShape&quot;: &quot;A String&quot;, # The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800351 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
352 {
353 &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.
354 },
355 ],
356 },
357 &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.
358 &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.
359 #
360 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
361 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
362 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700363 &quot;instanceLifecyclePolicy&quot;: { # Instance lifecycle policy for this Instance Group Manager.
364 &quot;metadataBasedReadinessSignal&quot;: { # The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance.
365 #
366 # If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method.
367 #
368 # If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them.
369 &quot;timeoutSec&quot;: 42, # The number of seconds to wait for a readiness signal during initialization before timing out.
370 },
371 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800372 &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.
373 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
374 &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.
375 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
376 { # The named port. For example: .
377 &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.
378 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
379 },
380 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800381 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
382 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
383 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
384 &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.
385 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
386 &quot;preservedState&quot;: { # Configuration of preserved resources.
387 &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.
388 &quot;a_key&quot;: {
389 &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.
390 },
391 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800392 &quot;externalIPs&quot;: { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
393 &quot;a_key&quot;: {
394 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
395 },
396 },
397 &quot;internalIPs&quot;: { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
398 &quot;a_key&quot;: {
399 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
400 },
401 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800402 },
403 },
404 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
405 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
406 &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.
407 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
408 &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.
409 &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.
410 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
411 &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.
412 },
413 },
414 &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.
415 &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.
416 },
417 },
418 &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.
419 &quot;A String&quot;,
420 ],
421 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700422 &quot;targetStoppedSize&quot;: 42, # The target number of stopped instances for this managed instance group. This number changes when you:
423 # - Stop instance using the stopInstances method or start instances using the startInstances method.
424 # - Manually change the targetStoppedSize using the update method.
425 &quot;targetSuspendedSize&quot;: 42, # The target number of suspended instances for this managed instance group. This number changes when you:
426 # - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method.
427 # - Manually change the targetSuspendedSize using the update method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800428 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
429 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
430 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
431 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800432 &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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800433 #
434 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
435 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
436 #
437 #
438 # - If the value is fixed, then the calculated value is equal to the fixed value.
439 # - 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.
440 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
441 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
442 },
443 &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:
444 #
445 #
446 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800447 # - If there is a health check on the instance group, the instance&#x27;s health check status 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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800448 #
449 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
450 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
451 #
452 #
453 # - If the value is fixed, then the calculated value is equal to the fixed value.
454 # - 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.
455 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
456 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
457 },
458 &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].
459 &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.
460 &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.
461 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
462 &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).
463 },
464 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
465 #
466 # 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.
467 {
468 &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.
469 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
470 &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;.
471 &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:
472 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
473 # - 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.
474 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
475 #
476 #
477 # - If the value is fixed, then the calculated value is equal to the fixed value.
478 # - 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.
479 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
480 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
481 },
482 },
483 ],
484 &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 -0700485 },
486 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800487 &quot;warning&quot;: { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
488 &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.
489 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
490 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
491 {
492 &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).
493 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
494 },
495 ],
496 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
497 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800499 },
500 &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.
501 &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.
502 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
503 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
504 &quot;A String&quot;,
505 ],
506 &quot;warning&quot;: { # [Output Only] Informational warning message.
507 &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.
508 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
509 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
510 {
511 &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).
512 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
513 },
514 ],
515 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
516 },
517}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700518</div>
519
520<div class="method">
521 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
522 <pre>Retrieves the next page of results.
523
524Args:
525 previous_request: The request for the previous page. (required)
526 previous_response: The response from the request for the previous page. (required)
527
528Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700530 page. Returns None if there are no more items in the collection.
531 </pre>
532</div>
533
534<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</code>
536 <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 -0700537
538Args:
539 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
541 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 The object takes the form of:
544
545{ # InstanceGroupManagers.applyUpdatesToInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800546 &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.
547 &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].
548 &quot;A String&quot;,
549 ],
550 &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.
551 &quot;minimalAction&quot;: &quot;A String&quot;, # The minimal action that you want to perform on each instance during the update:
552 # - REPLACE: At minimum, delete the instance and create it again.
553 # - RESTART: Stop the instance and start it again.
554 # - REFRESH: Do not stop the instance.
555 # - 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.
556 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # The most disruptive action that you want to perform on each instance during the update:
557 # - REPLACE: Delete the instance and create it again.
558 # - RESTART: Stop the instance and start it again.
559 # - REFRESH: Do not stop the instance.
560 # - 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.
561}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700562
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700563
564Returns:
565 An object of the form:
566
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800568 #
569 # Google Compute Engine has three Operation resources:
570 #
571 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
572 #
573 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
574 #
575 # Operations can be global, regional or zonal.
576 # - For global operations, use the `globalOperations` resource.
577 # - For regional operations, use the `regionOperations` resource.
578 # - For zonal operations, use the `zonalOperations` resource.
579 #
580 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
581 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
582 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
583 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
584 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
585 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
586 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800588 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
589 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
590 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700591 },
592 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800593 },
594 &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`.
595 &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.
596 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
597 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
598 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
599 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800600 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800601 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
602 &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.
603 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
604 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
605 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
606 &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.
607 &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`.
608 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
609 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
610 &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.
611 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
612 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
613 {
614 &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.
615 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
616 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
617 {
618 &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).
619 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
620 },
621 ],
622 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
623 },
624 ],
625 &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.
626}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627</div>
628
629<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700630 <code class="details" id="close">close()</code>
631 <pre>Close httplib2 connections.</pre>
632</div>
633
634<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 <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.
637
638Args:
639 project: string, Project ID for this request. (required)
640 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
641 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700642 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 The object takes the form of:
644
645{ # InstanceGroupManagers.createInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800646 &quot;instances&quot;: [ # [Required] List of specifications of per-instance configs.
647 {
648 &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.
649 &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.
650 &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.
651 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
652 &quot;a_key&quot;: {
653 &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.
654 &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.
655 &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 -0700656 },
657 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800658 &quot;externalIPs&quot;: { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
659 &quot;a_key&quot;: {
660 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
661 &quot;ipAddress&quot;: { # Ip address representation
662 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
663 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
664 },
665 },
666 },
667 &quot;internalIPs&quot;: { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
668 &quot;a_key&quot;: {
669 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
670 &quot;ipAddress&quot;: { # Ip address representation
671 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
672 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
673 },
674 },
675 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800676 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
677 &quot;a_key&quot;: &quot;A String&quot;,
678 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700679 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800680 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
681 },
682 ],
683}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684
685 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.
686
687For 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.
688
689The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
690
691Returns:
692 An object of the form:
693
694 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800695 #
696 # Google Compute Engine has three Operation resources:
697 #
698 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
699 #
700 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
701 #
702 # Operations can be global, regional or zonal.
703 # - For global operations, use the `globalOperations` resource.
704 # - For regional operations, use the `regionOperations` resource.
705 # - For zonal operations, use the `zonalOperations` resource.
706 #
707 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
708 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
709 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
710 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
711 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
712 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
713 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800715 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
716 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
717 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 },
719 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800720 },
721 &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`.
722 &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.
723 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
724 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
725 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
726 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800727 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800728 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
729 &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.
730 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
731 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
732 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
733 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
734 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
735 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
736 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
737 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
738 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
739 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
740 {
741 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
742 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
743 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
744 {
745 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
746 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
747 },
748 ],
749 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
750 },
751 ],
752 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
753}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700754</div>
755
756<div class="method">
757 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
758 <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.
759
760Args:
761 project: string, Project ID for this request. (required)
762 zone: string, The name of the zone where the managed instance group is located. (required)
763 instanceGroupManager: string, The name of the managed instance group to delete. (required)
764 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.
765
766For 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.
767
768The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
769
770Returns:
771 An object of the form:
772
773 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800774 #
775 # Google Compute Engine has three Operation resources:
776 #
777 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
778 #
779 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
780 #
781 # Operations can be global, regional or zonal.
782 # - For global operations, use the `globalOperations` resource.
783 # - For regional operations, use the `regionOperations` resource.
784 # - For zonal operations, use the `zonalOperations` resource.
785 #
786 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
787 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
788 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
789 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
790 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
791 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
792 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800794 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
795 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
796 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 },
798 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800799 },
800 &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`.
801 &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.
802 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
803 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
804 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
805 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800806 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800807 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
808 &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.
809 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
810 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
811 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
812 &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.
813 &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`.
814 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
815 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
816 &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.
817 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
818 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
819 {
820 &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.
821 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
822 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
823 {
824 &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).
825 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
826 },
827 ],
828 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
829 },
830 ],
831 &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.
832}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700833</div>
834
835<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700836 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700837 <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 -0700838
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400839If 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.
840
841You can specify a maximum of 1000 instances with this method per request.
842
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700843Args:
844 project: string, Project ID for this request. (required)
845 zone: string, The name of the zone where the managed instance group is located. (required)
846 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700847 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700848 The object takes the form of:
849
850{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800851 &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].
852 &quot;A String&quot;,
853 ],
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700854 &quot;skipInstancesOnValidationError&quot;: True or False, # Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group&#x27;s zone or region.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800855}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700856
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 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.
858
859For 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.
860
861The 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 -0700862
863Returns:
864 An object of the form:
865
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800867 #
868 # Google Compute Engine has three Operation resources:
869 #
870 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
871 #
872 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
873 #
874 # Operations can be global, regional or zonal.
875 # - For global operations, use the `globalOperations` resource.
876 # - For regional operations, use the `regionOperations` resource.
877 # - For zonal operations, use the `zonalOperations` resource.
878 #
879 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
880 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
881 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
882 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
883 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
884 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
885 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800887 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
888 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
889 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700890 },
891 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800892 },
893 &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`.
894 &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.
895 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
896 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
897 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
898 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800899 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800900 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
901 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
902 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
903 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
904 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
905 &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.
906 &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`.
907 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
908 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
909 &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.
910 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
911 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
912 {
913 &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.
914 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
915 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
916 {
917 &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).
918 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
919 },
920 ],
921 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
922 },
923 ],
924 &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.
925}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700926</div>
927
928<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 <pre>Deletes selected per-instance configs for the managed instance group.
931
932Args:
933 project: string, Project ID for this request. (required)
934 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
935 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700936 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937 The object takes the form of:
938
939{ # InstanceGroupManagers.deletePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800940 &quot;names&quot;: [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
941 &quot;A String&quot;,
942 ],
943}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944
945
946Returns:
947 An object of the form:
948
949 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800950 #
951 # Google Compute Engine has three Operation resources:
952 #
953 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
954 #
955 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
956 #
957 # Operations can be global, regional or zonal.
958 # - For global operations, use the `globalOperations` resource.
959 # - For regional operations, use the `regionOperations` resource.
960 # - For zonal operations, use the `zonalOperations` resource.
961 #
962 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
963 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
964 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
965 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
966 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
967 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
968 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800970 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
971 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
972 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 },
974 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800975 },
976 &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`.
977 &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.
978 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
979 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
980 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
981 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800982 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800983 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
984 &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.
985 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
986 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
987 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
988 &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.
989 &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`.
990 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
991 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
992 &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.
993 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
994 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
995 {
996 &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.
997 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
998 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
999 {
1000 &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).
1001 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1002 },
1003 ],
1004 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1005 },
1006 ],
1007 &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.
1008}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001009</div>
1010
1011<div class="method">
1012 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 <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 -07001014
1015Args:
1016 project: string, Project ID for this request. (required)
1017 zone: string, The name of the zone where the managed instance group is located. (required)
1018 instanceGroupManager: string, The name of the managed instance group. (required)
1019
1020Returns:
1021 An object of the form:
1022
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001023 { # Whether the instance is a standby. Properties of a standby instance comparing to the regular instance: ========================================================================= | regular | standby ========================================================================= managed by IGM? | yes | yes added to the IG? | yes | yes counts towards IGM&#x27;s target size? | yes | no taken into account by Autoscaler? | yes | no receives traffic from LB? | yes | no =========================================================================
1024 #
1025 # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001026 #
1027 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1028 #
1029 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1030 #
1031 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1032 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
1033 {
1034 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1035 &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].
1036 &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 -08001037 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001038 # 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 -07001039 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1040 #
1041 #
1042 # - If the value is fixed, then the calculated value is equal to the fixed value.
1043 # - 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.
1044 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1045 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1046 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001047 },
1048 ],
1049 &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.
1050 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1051 &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.
1052 &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.
1053 &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.
1054 #
1055 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1056 &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.
1057 &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.
1058 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1059 &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.
1060 &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.
1061 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001062 &quot;resuming&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.
1063 &quot;starting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.
1064 &quot;stopping&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.
1065 &quot;suspending&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001066 &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.
1067 },
1068 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1069 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001070 &quot;targetShape&quot;: &quot;A String&quot;, # The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001071 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1072 {
1073 &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.
1074 },
1075 ],
1076 },
1077 &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.
1078 &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.
1079 #
1080 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1081 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1082 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001083 &quot;instanceLifecyclePolicy&quot;: { # Instance lifecycle policy for this Instance Group Manager.
1084 &quot;metadataBasedReadinessSignal&quot;: { # The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance.
1085 #
1086 # If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method.
1087 #
1088 # If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them.
1089 &quot;timeoutSec&quot;: 42, # The number of seconds to wait for a readiness signal during initialization before timing out.
1090 },
1091 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001092 &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.
1093 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1094 &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.
1095 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1096 { # The named port. For example: .
1097 &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.
1098 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1099 },
1100 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001101 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1102 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1103 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1104 &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.
1105 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1106 &quot;preservedState&quot;: { # Configuration of preserved resources.
1107 &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.
1108 &quot;a_key&quot;: {
1109 &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.
1110 },
1111 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001112 &quot;externalIPs&quot;: { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
1113 &quot;a_key&quot;: {
1114 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1115 },
1116 },
1117 &quot;internalIPs&quot;: { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
1118 &quot;a_key&quot;: {
1119 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1120 },
1121 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001122 },
1123 },
1124 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1125 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1126 &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.
1127 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1128 &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.
1129 &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.
1130 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1131 &quot;allEffective&quot;: True or False, # A bit indicating if all of the group&#x27;s per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
1132 },
1133 },
1134 &quot;versionTarget&quot;: { # [Output Only] A status of consistency of Instances&#x27; versions with their target version specified by version field on Instance Group Manager.
1135 &quot;isReached&quot;: True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances&#x27; target version are specified by version field on Instance Group Manager.
1136 },
1137 },
1138 &quot;targetPools&quot;: [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
1139 &quot;A String&quot;,
1140 ],
1141 &quot;targetSize&quot;: 42, # The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001142 &quot;targetStoppedSize&quot;: 42, # The target number of stopped instances for this managed instance group. This number changes when you:
1143 # - Stop instance using the stopInstances method or start instances using the startInstances method.
1144 # - Manually change the targetStoppedSize using the update method.
1145 &quot;targetSuspendedSize&quot;: 42, # The target number of suspended instances for this managed instance group. This number changes when you:
1146 # - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method.
1147 # - Manually change the targetSuspendedSize using the update method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001148 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1149 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1150 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1151 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001152 &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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001153 #
1154 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1155 &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 -07001156 #
1157 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001158 # - If the value is fixed, then the calculated value is equal to the fixed value.
1159 # - 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.
1160 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1161 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1162 },
1163 &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:
1164 #
1165 #
1166 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001167 # - If there is a health check on the instance group, the instance&#x27;s health check status 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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001168 #
1169 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1170 &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 -07001171 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001172 #
1173 # - If the value is fixed, then the calculated value is equal to the fixed value.
1174 # - 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.
1175 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1176 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1177 },
1178 &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].
1179 &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.
1180 &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.
1181 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1182 &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).
1183 },
1184 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1185 #
1186 # 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.
1187 {
1188 &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.
1189 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1190 &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;.
1191 &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:
1192 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1193 # - 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 -07001194 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1195 #
1196 #
1197 # - If the value is fixed, then the calculated value is equal to the fixed value.
1198 # - 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.
1199 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1200 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1201 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001202 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001203 ],
1204 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
1205}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001206</div>
1207
1208<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001209 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001210 <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.
1211
1212A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
1213
1214Args:
1215 project: string, Project ID for this request. (required)
1216 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 -07001217 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001218 The object takes the form of:
1219
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001220{ # Whether the instance is a standby. Properties of a standby instance comparing to the regular instance: ========================================================================= | regular | standby ========================================================================= managed by IGM? | yes | yes added to the IG? | yes | yes counts towards IGM&#x27;s target size? | yes | no taken into account by Autoscaler? | yes | no receives traffic from LB? | yes | no =========================================================================
1221 #
1222 # Represents a Managed Instance Group resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001223 #
1224 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1225 #
1226 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1227 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001228 # 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 -07001229 &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 -07001230 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001231 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1232 &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].
1233 &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 -07001234 #
1235 # 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 -07001236 &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 -07001237 #
1238 #
1239 # - If the value is fixed, then the calculated value is equal to the fixed value.
1240 # - 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 -07001241 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1242 &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 -07001243 },
1244 },
1245 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 &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.
1247 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1248 &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.
1249 &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.
1250 &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 -07001251 #
1252 # 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 -07001253 &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.
1254 &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.
1255 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1256 &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.
1257 &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.
1258 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001259 &quot;resuming&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.
1260 &quot;starting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.
1261 &quot;stopping&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.
1262 &quot;suspending&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.
Bu Sun Kim65020912020-05-20 12:08:20 -07001263 &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 -07001264 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001265 &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 -07001266 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001267 &quot;targetShape&quot;: &quot;A String&quot;, # The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001268 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001269 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001270 &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 -07001271 },
1272 ],
1273 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001274 &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.
1275 &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.
1276 #
1277 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1278 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1279 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001280 &quot;instanceLifecyclePolicy&quot;: { # Instance lifecycle policy for this Instance Group Manager.
1281 &quot;metadataBasedReadinessSignal&quot;: { # The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance.
1282 #
1283 # If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method.
1284 #
1285 # If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them.
1286 &quot;timeoutSec&quot;: 42, # The number of seconds to wait for a readiness signal during initialization before timing out.
1287 },
1288 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001289 &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 -07001290 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1291 &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.
1292 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1293 { # The named port. For example: .
1294 &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.
1295 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1296 },
1297 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001298 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1299 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1300 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1301 &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.
1302 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1303 &quot;preservedState&quot;: { # Configuration of preserved resources.
1304 &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.
1305 &quot;a_key&quot;: {
1306 &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 -07001307 },
1308 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001309 &quot;externalIPs&quot;: { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
1310 &quot;a_key&quot;: {
1311 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1312 },
1313 },
1314 &quot;internalIPs&quot;: { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
1315 &quot;a_key&quot;: {
1316 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1317 },
1318 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001319 },
1320 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1322 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1323 &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.
1324 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1325 &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.
1326 &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 -07001327 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1328 &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.
1329 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001330 },
1331 &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.
1332 &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.
1333 },
1334 },
1335 &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.
1336 &quot;A String&quot;,
1337 ],
1338 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001339 &quot;targetStoppedSize&quot;: 42, # The target number of stopped instances for this managed instance group. This number changes when you:
1340 # - Stop instance using the stopInstances method or start instances using the startInstances method.
1341 # - Manually change the targetStoppedSize using the update method.
1342 &quot;targetSuspendedSize&quot;: 42, # The target number of suspended instances for this managed instance group. This number changes when you:
1343 # - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method.
1344 # - Manually change the targetSuspendedSize using the update method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001345 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1346 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1347 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1348 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001349 &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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07001350 #
1351 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1352 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1353 #
1354 #
1355 # - If the value is fixed, then the calculated value is equal to the fixed value.
1356 # - 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.
1357 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1358 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1359 },
1360 &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:
1361 #
1362 #
1363 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001364 # - If there is a health check on the instance group, the instance&#x27;s health check status 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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07001365 #
1366 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1367 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1368 #
1369 #
1370 # - If the value is fixed, then the calculated value is equal to the fixed value.
1371 # - 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.
1372 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1373 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1374 },
1375 &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].
1376 &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 -08001377 &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 -07001378 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1379 &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).
1380 },
1381 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1382 #
1383 # 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.
1384 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001385 &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 -07001386 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1387 &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;.
1388 &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:
1389 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1390 # - 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.
1391 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1392 #
1393 #
1394 # - If the value is fixed, then the calculated value is equal to the fixed value.
1395 # - 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.
1396 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1397 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1398 },
1399 },
1400 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001401 &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 -07001402}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001403
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001404 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.
1405
1406For 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.
1407
1408The 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 -07001409
1410Returns:
1411 An object of the form:
1412
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001414 #
1415 # Google Compute Engine has three Operation resources:
1416 #
1417 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1418 #
1419 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1420 #
1421 # Operations can be global, regional or zonal.
1422 # - For global operations, use the `globalOperations` resource.
1423 # - For regional operations, use the `regionOperations` resource.
1424 # - For zonal operations, use the `zonalOperations` resource.
1425 #
1426 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1427 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1428 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1429 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1430 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1431 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1432 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001434 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1435 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1436 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001437 },
1438 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001439 },
1440 &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`.
1441 &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.
1442 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1443 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1444 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1445 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001446 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001447 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1448 &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.
1449 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1450 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1451 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1452 &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.
1453 &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`.
1454 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1455 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1456 &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.
1457 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1458 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1459 {
1460 &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.
1461 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1462 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1463 {
1464 &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).
1465 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1466 },
1467 ],
1468 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1469 },
1470 ],
1471 &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.
1472}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001473</div>
1474
1475<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001476 <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 -07001477 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1478
1479Args:
1480 project: string, Project ID for this request. (required)
1481 zone: string, The name of the zone where the managed instance group is located. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001482 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 -07001483
Dan O'Mearadd494642020-05-01 07:42:23 -07001484For 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 -07001485
Dan O'Mearadd494642020-05-01 07:42:23 -07001486You 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 -07001487
Bu Sun Kim65020912020-05-20 12:08:20 -07001488To 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) ```
1489 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`)
1490 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1491
1492You 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.
1493
1494Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1495 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001496 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001497
1498Returns:
1499 An object of the form:
1500
1501 { # [Output Only] A list of managed instance groups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001502 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1503 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001504 { # Whether the instance is a standby. Properties of a standby instance comparing to the regular instance: ========================================================================= | regular | standby ========================================================================= managed by IGM? | yes | yes added to the IG? | yes | yes counts towards IGM&#x27;s target size? | yes | no taken into account by Autoscaler? | yes | no receives traffic from LB? | yes | no =========================================================================
1505 #
1506 # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001507 #
1508 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1509 #
1510 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1511 #
1512 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1513 &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 -07001514 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001515 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1516 &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].
1517 &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.
1518 #
1519 # 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.
1520 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1521 #
1522 #
1523 # - If the value is fixed, then the calculated value is equal to the fixed value.
1524 # - 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.
1525 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1526 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1527 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001528 },
1529 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001530 &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.
1531 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1532 &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.
1533 &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.
1534 &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.
1535 #
1536 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1537 &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.
1538 &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.
1539 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1540 &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.
1541 &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.
1542 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001543 &quot;resuming&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.
1544 &quot;starting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.
1545 &quot;stopping&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.
1546 &quot;suspending&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001547 &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.
1548 },
1549 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1550 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001551 &quot;targetShape&quot;: &quot;A String&quot;, # The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001552 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1553 {
1554 &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.
1555 },
1556 ],
1557 },
1558 &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.
1559 &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.
1560 #
1561 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1562 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1563 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001564 &quot;instanceLifecyclePolicy&quot;: { # Instance lifecycle policy for this Instance Group Manager.
1565 &quot;metadataBasedReadinessSignal&quot;: { # The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance.
1566 #
1567 # If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method.
1568 #
1569 # If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them.
1570 &quot;timeoutSec&quot;: 42, # The number of seconds to wait for a readiness signal during initialization before timing out.
1571 },
1572 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001573 &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.
1574 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1575 &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.
1576 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1577 { # The named port. For example: .
1578 &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.
1579 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1580 },
1581 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001582 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1583 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1584 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1585 &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.
1586 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1587 &quot;preservedState&quot;: { # Configuration of preserved resources.
1588 &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.
1589 &quot;a_key&quot;: {
1590 &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.
1591 },
1592 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001593 &quot;externalIPs&quot;: { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
1594 &quot;a_key&quot;: {
1595 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1596 },
1597 },
1598 &quot;internalIPs&quot;: { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
1599 &quot;a_key&quot;: {
1600 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1601 },
1602 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001603 },
1604 },
1605 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1606 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1607 &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.
1608 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1609 &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.
1610 &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.
1611 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1612 &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.
1613 },
1614 },
1615 &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.
1616 &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.
1617 },
1618 },
1619 &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.
1620 &quot;A String&quot;,
1621 ],
1622 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001623 &quot;targetStoppedSize&quot;: 42, # The target number of stopped instances for this managed instance group. This number changes when you:
1624 # - Stop instance using the stopInstances method or start instances using the startInstances method.
1625 # - Manually change the targetStoppedSize using the update method.
1626 &quot;targetSuspendedSize&quot;: 42, # The target number of suspended instances for this managed instance group. This number changes when you:
1627 # - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method.
1628 # - Manually change the targetSuspendedSize using the update method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001629 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1630 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1631 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1632 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001633 &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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001634 #
1635 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1636 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1637 #
1638 #
1639 # - If the value is fixed, then the calculated value is equal to the fixed value.
1640 # - 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.
1641 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1642 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1643 },
1644 &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:
1645 #
1646 #
1647 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001648 # - If there is a health check on the instance group, the instance&#x27;s health check status 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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001649 #
1650 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1651 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1652 #
1653 #
1654 # - If the value is fixed, then the calculated value is equal to the fixed value.
1655 # - 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.
1656 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1657 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1658 },
1659 &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].
1660 &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.
1661 &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.
1662 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1663 &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).
1664 },
1665 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1666 #
1667 # 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.
1668 {
1669 &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.
1670 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1671 &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;.
1672 &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:
1673 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1674 # - 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.
1675 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1676 #
1677 #
1678 # - If the value is fixed, then the calculated value is equal to the fixed value.
1679 # - 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.
1680 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1681 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1682 },
1683 },
1684 ],
1685 &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 -07001686 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001687 ],
1688 &quot;kind&quot;: &quot;compute#instanceGroupManagerList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1689 &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.
1690 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1691 &quot;warning&quot;: { # [Output Only] Informational warning message.
1692 &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.
1693 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1694 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1695 {
1696 &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).
1697 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1698 },
1699 ],
1700 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1701 },
1702}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001703</div>
1704
1705<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001706 <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 -07001707 <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 -07001708
1709Args:
1710 project: string, Project ID for this request. (required)
1711 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1712 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 -07001713 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 -07001714
Dan O'Mearadd494642020-05-01 07:42:23 -07001715For 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 -07001716
Dan O'Mearadd494642020-05-01 07:42:23 -07001717You 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 -07001718
Bu Sun Kim65020912020-05-20 12:08:20 -07001719To 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) ```
1720 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`)
1721 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1722
1723You 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.
1724
1725Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1726 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001727 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001728
1729Returns:
1730 An object of the form:
1731
1732 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001733 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
1734 {
1735 &quot;error&quot;: { # [Output Only] Contents of the error.
1736 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1737 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001738 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001739 &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.
1740 &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:
1741 &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.
1742 &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.
1743 &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 }.
1744 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1745 },
1746 },
1747 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1748 },
1749 ],
1750 &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.
1751}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001752</div>
1753
1754<div class="method">
1755 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1756 <pre>Retrieves the next page of results.
1757
1758Args:
1759 previous_request: The request for the previous page. (required)
1760 previous_response: The response from the request for the previous page. (required)
1761
1762Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001763 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001764 page. Returns None if there are no more items in the collection.
1765 </pre>
1766</div>
1767
1768<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001769 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
1770 <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 -07001771
1772Args:
1773 project: string, Project ID for this request. (required)
1774 zone: string, The name of the zone where the managed instance group is located. (required)
1775 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001776 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 -07001777
Dan O'Mearadd494642020-05-01 07:42:23 -07001778For 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 -07001779
Dan O'Mearadd494642020-05-01 07:42:23 -07001780You 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 -07001781
Bu Sun Kim65020912020-05-20 12:08:20 -07001782To 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) ```
1783 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`)
1784 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1785
1786You 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.
1787
1788Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1789 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001790 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001791
1792Returns:
1793 An object of the form:
1794
1795 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001796 &quot;managedInstances&quot;: [ # [Output Only] The list of instances in the managed instance group.
1797 { # A Managed Instance resource.
1798 &quot;currentAction&quot;: &quot;A String&quot;, # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1799 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1800 # - 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.
1801 # - 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.
1802 # - RECREATING The managed instance group is recreating this instance.
1803 # - DELETING The managed instance group is permanently deleting this instance.
1804 # - 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.
1805 # - RESTARTING The managed instance group is restarting the instance.
1806 # - 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.
1807 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
1808 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1809 &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.
1810 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1811 {
1812 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1813 &quot;healthCheck&quot;: &quot;A String&quot;, # [Output Only] The URL for the health check that verifies whether the instance is healthy.
1814 &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 -07001815 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001816 ],
1817 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1818 &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 }.
1819 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1820 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1821 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1822 {
1823 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1824 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1825 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001827 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001828 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001829 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001830 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1831 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1832 &quot;a_key&quot;: {
1833 &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.
1834 &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.
1835 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1836 },
1837 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001838 &quot;externalIPs&quot;: { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
1839 &quot;a_key&quot;: {
1840 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1841 &quot;ipAddress&quot;: { # Ip address representation
1842 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
1843 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
1844 },
1845 },
1846 },
1847 &quot;internalIPs&quot;: { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
1848 &quot;a_key&quot;: {
1849 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1850 &quot;ipAddress&quot;: { # Ip address representation
1851 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
1852 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
1853 },
1854 },
1855 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001856 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1857 &quot;a_key&quot;: &quot;A String&quot;,
1858 },
1859 },
1860 &quot;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1861 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1862 &quot;a_key&quot;: {
1863 &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.
1864 &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.
1865 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1866 },
1867 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001868 &quot;externalIPs&quot;: { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
1869 &quot;a_key&quot;: {
1870 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1871 &quot;ipAddress&quot;: { # Ip address representation
1872 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
1873 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
1874 },
1875 },
1876 },
1877 &quot;internalIPs&quot;: { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
1878 &quot;a_key&quot;: {
1879 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1880 &quot;ipAddress&quot;: { # Ip address representation
1881 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
1882 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
1883 },
1884 },
1885 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001886 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1887 &quot;a_key&quot;: &quot;A String&quot;,
1888 },
1889 },
1890 &quot;tag&quot;: &quot;A String&quot;, # [Output Only] Tag describing the version.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001891 &quot;targetStatus&quot;: &quot;A String&quot;, # [Output Only] The eventual status of the instance. The instance group manager will not be identified as stable till each managed instance reaches its targetStatus.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001892 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1893 &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 }.
1894 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1895 },
1896 },
1897 ],
1898 &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.
1899}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001900</div>
1901
1902<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001903 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1904 <pre>Retrieves the next page of results.
1905
1906Args:
1907 previous_request: The request for the previous page. (required)
1908 previous_response: The response from the request for the previous page. (required)
1909
1910Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001911 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001912 page. Returns None if there are no more items in the collection.
1913 </pre>
1914</div>
1915
1916<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001917 <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 -07001918 <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 -07001919
1920Args:
1921 project: string, Project ID for this request. (required)
1922 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1923 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001924 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 -07001925
Dan O'Mearadd494642020-05-01 07:42:23 -07001926For 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 -07001927
Dan O'Mearadd494642020-05-01 07:42:23 -07001928You 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 -07001929
Bu Sun Kim65020912020-05-20 12:08:20 -07001930To 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) ```
1931 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`)
1932 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1933
1934You 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.
1935
1936Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1937 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001938 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001939
1940Returns:
1941 An object of the form:
1942
1943 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001944 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
1945 {
1946 &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.
1947 &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.
1948 &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.
1949 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1950 &quot;a_key&quot;: {
1951 &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.
1952 &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.
1953 &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 -07001954 },
1955 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001956 &quot;externalIPs&quot;: { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
1957 &quot;a_key&quot;: {
1958 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1959 &quot;ipAddress&quot;: { # Ip address representation
1960 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
1961 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
1962 },
1963 },
1964 },
1965 &quot;internalIPs&quot;: { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
1966 &quot;a_key&quot;: {
1967 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
1968 &quot;ipAddress&quot;: { # Ip address representation
1969 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
1970 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
1971 },
1972 },
1973 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001974 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1975 &quot;a_key&quot;: &quot;A String&quot;,
1976 },
1977 },
1978 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1979 },
1980 ],
1981 &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.
1982 &quot;warning&quot;: { # [Output Only] Informational warning message.
1983 &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.
1984 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1985 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1986 {
1987 &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).
1988 &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 -07001989 },
1990 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001991 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1992 },
1993}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001994</div>
1995
1996<div class="method">
1997 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1998 <pre>Retrieves the next page of results.
1999
2000Args:
2001 previous_request: The request for the previous page. (required)
2002 previous_response: The response from the request for the previous page. (required)
2003
2004Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002005 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002006 page. Returns None if there are no more items in the collection.
2007 </pre>
2008</div>
2009
2010<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002011 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2012 <pre>Retrieves the next page of results.
2013
2014Args:
2015 previous_request: The request for the previous page. (required)
2016 previous_response: The response from the request for the previous page. (required)
2017
2018Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002019 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002020 page. Returns None if there are no more items in the collection.
2021 </pre>
2022</div>
2023
2024<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002025 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002026 <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 -07002027
2028Args:
2029 project: string, Project ID for this request. (required)
2030 zone: string, The name of the zone where you want to create the managed instance group. (required)
2031 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002032 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002033 The object takes the form of:
2034
yoshi-code-botc2cd3262021-05-16 02:16:04 -07002035{ # Whether the instance is a standby. Properties of a standby instance comparing to the regular instance: ========================================================================= | regular | standby ========================================================================= managed by IGM? | yes | yes added to the IG? | yes | yes counts towards IGM&#x27;s target size? | yes | no taken into account by Autoscaler? | yes | no receives traffic from LB? | yes | no =========================================================================
2036 #
2037 # Represents a Managed Instance Group resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002038 #
2039 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2040 #
2041 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2042 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002043 # 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 -07002044 &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 -07002045 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002046 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2047 &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].
2048 &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 -07002049 #
2050 # 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 -07002051 &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 -07002052 #
2053 #
2054 # - If the value is fixed, then the calculated value is equal to the fixed value.
2055 # - 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 -07002056 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2057 &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 -07002058 },
2059 },
2060 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002061 &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.
2062 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2063 &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.
2064 &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.
2065 &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 -07002066 #
2067 # 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 -07002068 &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.
2069 &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.
2070 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2071 &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.
2072 &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.
2073 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002074 &quot;resuming&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.
2075 &quot;starting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.
2076 &quot;stopping&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.
2077 &quot;suspending&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.
Bu Sun Kim65020912020-05-20 12:08:20 -07002078 &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 -07002079 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002080 &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 -07002081 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002082 &quot;targetShape&quot;: &quot;A String&quot;, # The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002083 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002084 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002085 &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 -08002086 },
2087 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002088 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002089 &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.
2090 &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.
2091 #
2092 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2093 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2094 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002095 &quot;instanceLifecyclePolicy&quot;: { # Instance lifecycle policy for this Instance Group Manager.
2096 &quot;metadataBasedReadinessSignal&quot;: { # The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance.
2097 #
2098 # If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method.
2099 #
2100 # If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them.
2101 &quot;timeoutSec&quot;: 42, # The number of seconds to wait for a readiness signal during initialization before timing out.
2102 },
2103 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002104 &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 -07002105 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2106 &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.
2107 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2108 { # The named port. For example: .
2109 &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.
2110 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
2111 },
2112 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002113 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2114 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
2115 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2116 &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.
2117 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
2118 &quot;preservedState&quot;: { # Configuration of preserved resources.
2119 &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.
2120 &quot;a_key&quot;: {
2121 &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 -07002122 },
2123 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002124 &quot;externalIPs&quot;: { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
2125 &quot;a_key&quot;: {
2126 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
2127 },
2128 },
2129 &quot;internalIPs&quot;: { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
2130 &quot;a_key&quot;: {
2131 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
2132 },
2133 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002134 },
2135 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002136 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
2137 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
2138 &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.
2139 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
2140 &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.
2141 &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 -07002142 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
2143 &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.
2144 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002145 },
2146 &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.
2147 &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.
2148 },
2149 },
2150 &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.
2151 &quot;A String&quot;,
2152 ],
2153 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002154 &quot;targetStoppedSize&quot;: 42, # The target number of stopped instances for this managed instance group. This number changes when you:
2155 # - Stop instance using the stopInstances method or start instances using the startInstances method.
2156 # - Manually change the targetStoppedSize using the update method.
2157 &quot;targetSuspendedSize&quot;: 42, # The target number of suspended instances for this managed instance group. This number changes when you:
2158 # - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method.
2159 # - Manually change the targetSuspendedSize using the update method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002160 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
2161 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
2162 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
2163 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002164 &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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07002165 #
2166 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2167 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2168 #
2169 #
2170 # - If the value is fixed, then the calculated value is equal to the fixed value.
2171 # - 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.
2172 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2173 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2174 },
2175 &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:
2176 #
2177 #
2178 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002179 # - If there is a health check on the instance group, the instance&#x27;s health check status 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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07002180 #
2181 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2182 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2183 #
2184 #
2185 # - If the value is fixed, then the calculated value is equal to the fixed value.
2186 # - 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.
2187 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2188 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2189 },
2190 &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].
2191 &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 -08002192 &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 -07002193 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
2194 &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).
2195 },
2196 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
2197 #
2198 # 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.
2199 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002200 &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 -07002201 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
2202 &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;.
2203 &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:
2204 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2205 # - 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.
2206 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2207 #
2208 #
2209 # - If the value is fixed, then the calculated value is equal to the fixed value.
2210 # - 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.
2211 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2212 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2213 },
2214 },
2215 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002216 &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 -07002217}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002218
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002219 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.
2220
2221For 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.
2222
2223The 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 -07002224
2225Returns:
2226 An object of the form:
2227
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002228 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002229 #
2230 # Google Compute Engine has three Operation resources:
2231 #
2232 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2233 #
2234 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2235 #
2236 # Operations can be global, regional or zonal.
2237 # - For global operations, use the `globalOperations` resource.
2238 # - For regional operations, use the `regionOperations` resource.
2239 # - For zonal operations, use the `zonalOperations` resource.
2240 #
2241 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2242 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2243 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2244 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2245 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2246 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2247 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002248 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002249 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2250 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2251 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002252 },
2253 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002254 },
2255 &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`.
2256 &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.
2257 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2258 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2259 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2260 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002261 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002262 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2263 &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.
2264 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2265 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2266 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2267 &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.
2268 &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`.
2269 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2270 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2271 &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.
2272 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2273 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2274 {
2275 &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.
2276 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2277 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2278 {
2279 &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).
2280 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2281 },
2282 ],
2283 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2284 },
2285 ],
2286 &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.
2287}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002288</div>
2289
2290<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002291 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2292 <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 -07002293
2294Args:
2295 project: string, Project ID for this request. (required)
2296 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2297 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002298 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002299 The object takes the form of:
2300
2301{ # InstanceGroupManagers.patchPerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002302 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
2303 {
2304 &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.
2305 &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.
2306 &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.
2307 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2308 &quot;a_key&quot;: {
2309 &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.
2310 &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.
2311 &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 -07002312 },
2313 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002314 &quot;externalIPs&quot;: { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
2315 &quot;a_key&quot;: {
2316 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
2317 &quot;ipAddress&quot;: { # Ip address representation
2318 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
2319 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
2320 },
2321 },
2322 },
2323 &quot;internalIPs&quot;: { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
2324 &quot;a_key&quot;: {
2325 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
2326 &quot;ipAddress&quot;: { # Ip address representation
2327 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
2328 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
2329 },
2330 },
2331 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002332 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2333 &quot;a_key&quot;: &quot;A String&quot;,
2334 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002335 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002336 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
2337 },
2338 ],
2339}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002340
2341 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.
2342
2343For 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.
2344
2345The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2346
2347Returns:
2348 An object of the form:
2349
2350 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002351 #
2352 # Google Compute Engine has three Operation resources:
2353 #
2354 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2355 #
2356 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2357 #
2358 # Operations can be global, regional or zonal.
2359 # - For global operations, use the `globalOperations` resource.
2360 # - For regional operations, use the `regionOperations` resource.
2361 # - For zonal operations, use the `zonalOperations` resource.
2362 #
2363 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2364 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2365 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2366 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2367 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2368 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2369 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002370 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002371 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2372 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2373 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002374 },
2375 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002376 },
2377 &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`.
2378 &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.
2379 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2380 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2381 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2382 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002383 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002384 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2385 &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.
2386 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2387 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2388 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2389 &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.
2390 &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`.
2391 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2392 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2393 &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.
2394 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2395 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2396 {
2397 &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.
2398 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2399 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2400 {
2401 &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).
2402 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2403 },
2404 ],
2405 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2406 },
2407 ],
2408 &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.
2409}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002410</div>
2411
2412<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002413 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04002414 <pre>Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group&#x27;s current configuration. 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 each instance by checking its currentAction field; for more information, see Checking the status of managed instances.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002415
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002416If 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.
2417
2418You can specify a maximum of 1000 instances with this method per request.
2419
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002420Args:
2421 project: string, Project ID for this request. (required)
2422 zone: string, The name of the zone where the managed instance group is located. (required)
2423 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002424 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002425 The object takes the form of:
2426
2427{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002428 &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].
2429 &quot;A String&quot;,
2430 ],
2431}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002432
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002433 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.
2434
2435For 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.
2436
2437The 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 -07002438
2439Returns:
2440 An object of the form:
2441
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002442 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002443 #
2444 # Google Compute Engine has three Operation resources:
2445 #
2446 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2447 #
2448 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2449 #
2450 # Operations can be global, regional or zonal.
2451 # - For global operations, use the `globalOperations` resource.
2452 # - For regional operations, use the `regionOperations` resource.
2453 # - For zonal operations, use the `zonalOperations` resource.
2454 #
2455 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2456 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2457 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2458 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2459 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2460 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2461 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002462 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002463 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2464 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2465 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002466 },
2467 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002468 },
2469 &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`.
2470 &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.
2471 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2472 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2473 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2474 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002475 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002476 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2477 &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.
2478 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2479 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2480 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2481 &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.
2482 &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`.
2483 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2484 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2485 &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.
2486 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2487 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2488 {
2489 &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.
2490 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2491 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2492 {
2493 &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).
2494 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2495 },
2496 ],
2497 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2498 },
2499 ],
2500 &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.
2501}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002502</div>
2503
2504<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002505 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002506 <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.
2507
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002508When 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:
2509
2510+ 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.
2511
2512This list is subject to change.
2513
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002514If 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.
2515
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002516Args:
2517 project: string, Project ID for this request. (required)
2518 zone: string, The name of the zone where the managed instance group is located. (required)
2519 instanceGroupManager: string, The name of the managed instance group. (required)
2520 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 -07002521 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.
2522
2523For 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.
2524
2525The 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 -07002526
2527Returns:
2528 An object of the form:
2529
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002530 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002531 #
2532 # Google Compute Engine has three Operation resources:
2533 #
2534 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2535 #
2536 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2537 #
2538 # Operations can be global, regional or zonal.
2539 # - For global operations, use the `globalOperations` resource.
2540 # - For regional operations, use the `regionOperations` resource.
2541 # - For zonal operations, use the `zonalOperations` resource.
2542 #
2543 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2544 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2545 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2546 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2547 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2548 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2549 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002550 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002551 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2552 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2553 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002554 },
2555 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002556 },
2557 &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`.
2558 &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.
2559 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2560 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2561 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2562 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002563 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002564 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2565 &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.
2566 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2567 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2568 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2569 &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.
2570 &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`.
2571 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2572 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2573 &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.
2574 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2575 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2576 {
2577 &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.
2578 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2579 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2580 {
2581 &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).
2582 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2583 },
2584 ],
2585 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2586 },
2587 ],
2588 &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.
2589}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002590</div>
2591
2592<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002593 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002594 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
2595
2596If 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.
2597
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002598If 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.
2599
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002600Args:
2601 project: string, Project ID for this request. (required)
2602 zone: string, The name of the zone where the managed instance group is located. (required)
2603 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002604 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002605 The object takes the form of:
2606
2607{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002608 &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.
2609 #
2610 # 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.
2611 #
2612 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
2613 #
2614 # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
2615 &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.
2616}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002617
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002618 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.
2619
2620For 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.
2621
2622The 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 -07002623
2624Returns:
2625 An object of the form:
2626
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002627 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002628 #
2629 # Google Compute Engine has three Operation resources:
2630 #
2631 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2632 #
2633 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2634 #
2635 # Operations can be global, regional or zonal.
2636 # - For global operations, use the `globalOperations` resource.
2637 # - For regional operations, use the `regionOperations` resource.
2638 # - For zonal operations, use the `zonalOperations` resource.
2639 #
2640 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2641 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2642 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2643 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2644 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2645 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2646 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002647 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002648 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2649 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2650 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002651 },
2652 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002653 },
2654 &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`.
2655 &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.
2656 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2657 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2658 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2659 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002660 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002661 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2662 &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.
2663 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2664 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2665 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2666 &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.
2667 &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`.
2668 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2669 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2670 &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.
2671 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2672 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2673 {
2674 &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.
2675 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2676 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2677 {
2678 &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).
2679 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2680 },
2681 ],
2682 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2683 },
2684 ],
2685 &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.
2686}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002687</div>
2688
2689<div class="method">
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002690 <code class="details" id="resumeInstances">resumeInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2691 <pre>Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method.
2692
2693In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method.
2694
2695If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed.
2696
2697You can specify a maximum of 1000 instances with this method per request.
2698
2699Args:
2700 project: string, Project ID for this request. (required)
2701 zone: string, The name of the zone where the managed instance group is located. (required)
2702 instanceGroupManager: string, The name of the managed instance group. (required)
2703 body: object, The request body.
2704 The object takes the form of:
2705
2706{
2707 &quot;instances&quot;: [ # The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
2708 &quot;A String&quot;,
2709 ],
2710}
2711
2712 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.
2713
2714For 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.
2715
2716The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2717
2718Returns:
2719 An object of the form:
2720
2721 { # Represents an Operation resource.
2722 #
2723 # Google Compute Engine has three Operation resources:
2724 #
2725 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2726 #
2727 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2728 #
2729 # Operations can be global, regional or zonal.
2730 # - For global operations, use the `globalOperations` resource.
2731 # - For regional operations, use the `regionOperations` resource.
2732 # - For zonal operations, use the `zonalOperations` resource.
2733 #
2734 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2735 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2736 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2737 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2738 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2739 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2740 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
2741 {
2742 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2743 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2744 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
2745 },
2746 ],
2747 },
2748 &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`.
2749 &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.
2750 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2751 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2752 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002753 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2754 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
2755 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2756 &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.
2757 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2758 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2759 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2760 &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.
2761 &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`.
2762 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2763 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2764 &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.
2765 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2766 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2767 {
2768 &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.
2769 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2770 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2771 {
2772 &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).
2773 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2774 },
2775 ],
2776 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2777 },
2778 ],
2779 &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.
2780}</pre>
2781</div>
2782
2783<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002784 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002785 <pre>Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002786
2787Args:
2788 project: string, Project ID for this request. (required)
2789 zone: string, The name of the zone where the managed instance group is located. (required)
2790 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002791 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002792 The object takes the form of:
2793
2794{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002795 &quot;autoHealingPolicies&quot;: [
2796 {
2797 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2798 &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].
2799 &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.
2800 #
2801 # 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.
2802 &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 -07002803 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002804 #
2805 # - If the value is fixed, then the calculated value is equal to the fixed value.
2806 # - 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.
2807 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2808 &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 -07002809 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002810 },
2811 ],
2812}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002813
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002814 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.
2815
2816For 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.
2817
2818The 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 -07002819
2820Returns:
2821 An object of the form:
2822
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002823 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002824 #
2825 # Google Compute Engine has three Operation resources:
2826 #
2827 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2828 #
2829 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2830 #
2831 # Operations can be global, regional or zonal.
2832 # - For global operations, use the `globalOperations` resource.
2833 # - For regional operations, use the `regionOperations` resource.
2834 # - For zonal operations, use the `zonalOperations` resource.
2835 #
2836 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2837 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2838 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2839 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2840 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2841 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2842 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002843 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002844 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2845 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2846 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002847 },
2848 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002849 },
2850 &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`.
2851 &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.
2852 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2853 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2854 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2855 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002856 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002857 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2858 &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.
2859 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2860 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2861 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2862 &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.
2863 &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`.
2864 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2865 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2866 &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.
2867 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2868 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2869 {
2870 &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.
2871 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2872 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2873 {
2874 &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).
2875 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2876 },
2877 ],
2878 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2879 },
2880 ],
2881 &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.
2882}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002883</div>
2884
2885<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002886 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002887 <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 -07002888
2889Args:
2890 project: string, Project ID for this request. (required)
2891 zone: string, The name of the zone where the managed instance group is located. (required)
2892 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002893 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002894 The object takes the form of:
2895
2896{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002897 &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.
2898}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002899
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002900 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.
2901
2902For 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.
2903
2904The 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 -07002905
2906Returns:
2907 An object of the form:
2908
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002909 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002910 #
2911 # Google Compute Engine has three Operation resources:
2912 #
2913 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2914 #
2915 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2916 #
2917 # Operations can be global, regional or zonal.
2918 # - For global operations, use the `globalOperations` resource.
2919 # - For regional operations, use the `regionOperations` resource.
2920 # - For zonal operations, use the `zonalOperations` resource.
2921 #
2922 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2923 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2924 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2925 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2926 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2927 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2928 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002929 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002930 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2931 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2932 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002933 },
2934 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002935 },
2936 &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`.
2937 &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.
2938 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2939 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2940 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2941 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002942 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002943 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2944 &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.
2945 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2946 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2947 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2948 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2949 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2950 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2951 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2952 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2953 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2954 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2955 {
2956 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2957 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2958 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2959 {
2960 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2961 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2962 },
2963 ],
2964 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2965 },
2966 ],
2967 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2968}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002969</div>
2970
2971<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002972 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002973 <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.
2974
2975Args:
2976 project: string, Project ID for this request. (required)
2977 zone: string, The name of the zone where the managed instance group is located. (required)
2978 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002979 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002980 The object takes the form of:
2981
2982{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002983 &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.
2984 &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.
2985 &quot;A String&quot;,
2986 ],
2987}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002988
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002989 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.
2990
2991For 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.
2992
2993The 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 -07002994
2995Returns:
2996 An object of the form:
2997
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002998 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002999 #
3000 # Google Compute Engine has three Operation resources:
3001 #
3002 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3003 #
3004 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3005 #
3006 # Operations can be global, regional or zonal.
3007 # - For global operations, use the `globalOperations` resource.
3008 # - For regional operations, use the `regionOperations` resource.
3009 # - For zonal operations, use the `zonalOperations` resource.
3010 #
3011 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3012 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3013 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3014 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3015 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3016 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3017 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003018 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003019 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3020 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3021 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003022 },
3023 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003024 },
3025 &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`.
3026 &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.
3027 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3028 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3029 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3030 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003031 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003032 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3033 &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.
3034 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3035 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3036 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3037 &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.
3038 &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`.
3039 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3040 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3041 &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.
3042 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3043 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3044 {
3045 &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.
3046 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3047 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3048 {
3049 &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).
3050 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3051 },
3052 ],
3053 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3054 },
3055 ],
3056 &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.
3057}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003058</div>
3059
3060<div class="method">
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003061 <code class="details" id="startInstances">startInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
3062 <pre>Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method.
3063
3064In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method.
3065
3066If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started.
3067
3068You can specify a maximum of 1000 instances with this method per request.
3069
3070Args:
3071 project: string, Project ID for this request. (required)
3072 zone: string, The name of the zone where the managed instance group is located. (required)
3073 instanceGroupManager: string, The name of the managed instance group. (required)
3074 body: object, The request body.
3075 The object takes the form of:
3076
3077{
3078 &quot;instances&quot;: [ # The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
3079 &quot;A String&quot;,
3080 ],
3081}
3082
3083 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.
3084
3085For 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.
3086
3087The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3088
3089Returns:
3090 An object of the form:
3091
3092 { # Represents an Operation resource.
3093 #
3094 # Google Compute Engine has three Operation resources:
3095 #
3096 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3097 #
3098 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3099 #
3100 # Operations can be global, regional or zonal.
3101 # - For global operations, use the `globalOperations` resource.
3102 # - For regional operations, use the `regionOperations` resource.
3103 # - For zonal operations, use the `zonalOperations` resource.
3104 #
3105 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3106 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3107 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3108 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3109 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3110 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3111 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
3112 {
3113 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3114 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3115 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3116 },
3117 ],
3118 },
3119 &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`.
3120 &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.
3121 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3122 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3123 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003124 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3125 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
3126 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3127 &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.
3128 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3129 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3130 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3131 &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.
3132 &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`.
3133 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3134 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3135 &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.
3136 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3137 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3138 {
3139 &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.
3140 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3141 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3142 {
3143 &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).
3144 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3145 },
3146 ],
3147 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3148 },
3149 ],
3150 &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.
3151}</pre>
3152</div>
3153
3154<div class="method">
3155 <code class="details" id="stopInstances">stopInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
3156 <pre>Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method.
3157
3158If the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is stopped, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_STOP on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not stopped.
3159
3160If 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 suspended.
3161
3162Stopped instances can be started using the startInstances method.
3163
3164You can specify a maximum of 1000 instances with this method per request.
3165
3166Args:
3167 project: string, Project ID for this request. (required)
3168 zone: string, The name of the zone where the managed instance group is located. (required)
3169 instanceGroupManager: string, The name of the managed instance group. (required)
3170 body: object, The request body.
3171 The object takes the form of:
3172
3173{
3174 &quot;forceStop&quot;: True or False, # If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them.
3175 &quot;instances&quot;: [ # The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
3176 &quot;A String&quot;,
3177 ],
3178}
3179
3180 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.
3181
3182For 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.
3183
3184The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3185
3186Returns:
3187 An object of the form:
3188
3189 { # Represents an Operation resource.
3190 #
3191 # Google Compute Engine has three Operation resources:
3192 #
3193 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3194 #
3195 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3196 #
3197 # Operations can be global, regional or zonal.
3198 # - For global operations, use the `globalOperations` resource.
3199 # - For regional operations, use the `regionOperations` resource.
3200 # - For zonal operations, use the `zonalOperations` resource.
3201 #
3202 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3203 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3204 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3205 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3206 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3207 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3208 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
3209 {
3210 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3211 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3212 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3213 },
3214 ],
3215 },
3216 &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`.
3217 &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.
3218 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3219 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3220 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003221 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3222 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
3223 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3224 &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.
3225 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3226 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3227 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3228 &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.
3229 &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`.
3230 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3231 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3232 &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.
3233 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3234 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3235 {
3236 &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.
3237 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3238 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3239 {
3240 &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).
3241 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3242 },
3243 ],
3244 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3245 },
3246 ],
3247 &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.
3248}</pre>
3249</div>
3250
3251<div class="method">
3252 <code class="details" id="suspendInstances">suspendInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
3253 <pre>Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method.
3254
3255If the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is suspended, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_SUSPEND on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not suspended.
3256
3257If 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 suspended.
3258
3259Suspended instances can be resumed using the resumeInstances method.
3260
3261You can specify a maximum of 1000 instances with this method per request.
3262
3263Args:
3264 project: string, Project ID for this request. (required)
3265 zone: string, The name of the zone where the managed instance group is located. (required)
3266 instanceGroupManager: string, The name of the managed instance group. (required)
3267 body: object, The request body.
3268 The object takes the form of:
3269
3270{
3271 &quot;forceSuspend&quot;: True or False, # If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.
3272 &quot;instances&quot;: [ # The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
3273 &quot;A String&quot;,
3274 ],
3275}
3276
3277 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.
3278
3279For 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.
3280
3281The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3282
3283Returns:
3284 An object of the form:
3285
3286 { # Represents an Operation resource.
3287 #
3288 # Google Compute Engine has three Operation resources:
3289 #
3290 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3291 #
3292 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3293 #
3294 # Operations can be global, regional or zonal.
3295 # - For global operations, use the `globalOperations` resource.
3296 # - For regional operations, use the `regionOperations` resource.
3297 # - For zonal operations, use the `zonalOperations` resource.
3298 #
3299 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3300 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3301 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3302 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3303 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3304 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3305 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
3306 {
3307 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3308 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3309 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3310 },
3311 ],
3312 },
3313 &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`.
3314 &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.
3315 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3316 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3317 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003318 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3319 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
3320 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3321 &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.
3322 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3323 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3324 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3325 &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.
3326 &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`.
3327 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3328 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3329 &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.
3330 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3331 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3332 {
3333 &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.
3334 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3335 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3336 {
3337 &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).
3338 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3339 },
3340 ],
3341 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3342 },
3343 ],
3344 &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.
3345}</pre>
3346</div>
3347
3348<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003349 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003350 <pre>Returns permissions that a caller has on the specified resource.
3351
3352Args:
3353 project: string, Project ID for this request. (required)
3354 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003355 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003356 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003357 The object takes the form of:
3358
3359{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003360 &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.
3361 &quot;A String&quot;,
3362 ],
3363}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003364
3365
3366Returns:
3367 An object of the form:
3368
3369 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003370 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
3371 &quot;A String&quot;,
3372 ],
3373}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003374</div>
3375
3376<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003377 <code class="details" id="update">update(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003378 <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 -07003379
3380Args:
3381 project: string, Project ID for this request. (required)
3382 zone: string, The name of the zone where you want to create the managed instance group. (required)
3383 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003384 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003385 The object takes the form of:
3386
yoshi-code-botc2cd3262021-05-16 02:16:04 -07003387{ # Whether the instance is a standby. Properties of a standby instance comparing to the regular instance: ========================================================================= | regular | standby ========================================================================= managed by IGM? | yes | yes added to the IG? | yes | yes counts towards IGM&#x27;s target size? | yes | no taken into account by Autoscaler? | yes | no receives traffic from LB? | yes | no =========================================================================
3388 #
3389 # Represents a Managed Instance Group resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003390 #
3391 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
3392 #
3393 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
3394 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003395 # 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 -07003396 &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 -07003397 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003398 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
3399 &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].
3400 &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 -07003401 #
3402 # 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 -07003403 &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 -07003404 #
3405 #
3406 # - If the value is fixed, then the calculated value is equal to the fixed value.
3407 # - 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 -07003408 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
3409 &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 -07003410 },
3411 },
3412 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003413 &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.
3414 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
3415 &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.
3416 &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.
3417 &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 -07003418 #
3419 # 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 -07003420 &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.
3421 &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.
3422 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
3423 &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.
3424 &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.
3425 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003426 &quot;resuming&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.
3427 &quot;starting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.
3428 &quot;stopping&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.
3429 &quot;suspending&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.
Bu Sun Kim65020912020-05-20 12:08:20 -07003430 &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 -07003431 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003432 &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 -07003433 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003434 &quot;targetShape&quot;: &quot;A String&quot;, # The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07003435 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003436 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003437 &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 -08003438 },
3439 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003440 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003441 &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.
3442 &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.
3443 #
3444 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
3445 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
3446 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003447 &quot;instanceLifecyclePolicy&quot;: { # Instance lifecycle policy for this Instance Group Manager.
3448 &quot;metadataBasedReadinessSignal&quot;: { # The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance.
3449 #
3450 # If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method.
3451 #
3452 # If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them.
3453 &quot;timeoutSec&quot;: 42, # The number of seconds to wait for a readiness signal during initialization before timing out.
3454 },
3455 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07003456 &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 -07003457 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
3458 &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.
3459 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
3460 { # The named port. For example: .
3461 &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.
3462 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
3463 },
3464 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003465 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
3466 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
3467 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3468 &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.
3469 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
3470 &quot;preservedState&quot;: { # Configuration of preserved resources.
3471 &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.
3472 &quot;a_key&quot;: {
3473 &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 -07003474 },
3475 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003476 &quot;externalIPs&quot;: { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
3477 &quot;a_key&quot;: {
3478 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
3479 },
3480 },
3481 &quot;internalIPs&quot;: { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
3482 &quot;a_key&quot;: {
3483 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
3484 },
3485 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003486 },
3487 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003488 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
3489 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
3490 &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.
3491 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
3492 &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.
3493 &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 -07003494 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
3495 &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.
3496 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003497 },
3498 &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.
3499 &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.
3500 },
3501 },
3502 &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.
3503 &quot;A String&quot;,
3504 ],
3505 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003506 &quot;targetStoppedSize&quot;: 42, # The target number of stopped instances for this managed instance group. This number changes when you:
3507 # - Stop instance using the stopInstances method or start instances using the startInstances method.
3508 # - Manually change the targetStoppedSize using the update method.
3509 &quot;targetSuspendedSize&quot;: 42, # The target number of suspended instances for this managed instance group. This number changes when you:
3510 # - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method.
3511 # - Manually change the targetSuspendedSize using the update method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003512 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
3513 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
3514 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
3515 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003516 &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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07003517 #
3518 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
3519 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
3520 #
3521 #
3522 # - If the value is fixed, then the calculated value is equal to the fixed value.
3523 # - 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.
3524 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
3525 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
3526 },
3527 &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:
3528 #
3529 #
3530 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003531 # - If there is a health check on the instance group, the instance&#x27;s health check status 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. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07003532 #
3533 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
3534 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
3535 #
3536 #
3537 # - If the value is fixed, then the calculated value is equal to the fixed value.
3538 # - 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.
3539 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
3540 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
3541 },
3542 &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].
3543 &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 -08003544 &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 -07003545 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
3546 &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).
3547 },
3548 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
3549 #
3550 # 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.
3551 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07003552 &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 -07003553 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
3554 &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;.
3555 &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:
3556 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
3557 # - 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.
3558 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
3559 #
3560 #
3561 # - If the value is fixed, then the calculated value is equal to the fixed value.
3562 # - 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.
3563 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
3564 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
3565 },
3566 },
3567 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07003568 &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 -07003569}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003570
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003571 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.
3572
3573For 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.
3574
3575The 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 -07003576
3577Returns:
3578 An object of the form:
3579
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003580 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003581 #
3582 # Google Compute Engine has three Operation resources:
3583 #
3584 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3585 #
3586 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3587 #
3588 # Operations can be global, regional or zonal.
3589 # - For global operations, use the `globalOperations` resource.
3590 # - For regional operations, use the `regionOperations` resource.
3591 # - For zonal operations, use the `zonalOperations` resource.
3592 #
3593 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3594 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3595 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3596 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3597 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3598 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3599 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003600 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003601 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3602 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3603 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003604 },
3605 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003606 },
3607 &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`.
3608 &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.
3609 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3610 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3611 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3612 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003613 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003614 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3615 &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.
3616 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3617 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3618 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3619 &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.
3620 &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`.
3621 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3622 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3623 &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.
3624 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3625 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3626 {
3627 &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.
3628 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3629 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3630 {
3631 &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).
3632 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3633 },
3634 ],
3635 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3636 },
3637 ],
3638 &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.
3639}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003640</div>
3641
3642<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003643 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
3644 <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 -07003645
3646Args:
3647 project: string, Project ID for this request. (required)
3648 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
3649 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003650 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003651 The object takes the form of:
3652
3653{ # InstanceGroupManagers.updatePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003654 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
3655 {
3656 &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.
3657 &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.
3658 &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.
3659 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
3660 &quot;a_key&quot;: {
3661 &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.
3662 &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.
3663 &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 -07003664 },
3665 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003666 &quot;externalIPs&quot;: { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
3667 &quot;a_key&quot;: {
3668 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
3669 &quot;ipAddress&quot;: { # Ip address representation
3670 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
3671 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
3672 },
3673 },
3674 },
3675 &quot;internalIPs&quot;: { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
3676 &quot;a_key&quot;: {
3677 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.
3678 &quot;ipAddress&quot;: { # Ip address representation
3679 &quot;address&quot;: &quot;A String&quot;, # The URL of the reservation for this IP address.
3680 &quot;literal&quot;: &quot;A String&quot;, # An IPv4 internal network address to assign to the instance for this network interface.
3681 },
3682 },
3683 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003684 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
3685 &quot;a_key&quot;: &quot;A String&quot;,
3686 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003687 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003688 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
3689 },
3690 ],
3691}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003692
3693 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.
3694
3695For 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.
3696
3697The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3698
3699Returns:
3700 An object of the form:
3701
3702 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003703 #
3704 # Google Compute Engine has three Operation resources:
3705 #
3706 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3707 #
3708 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3709 #
3710 # Operations can be global, regional or zonal.
3711 # - For global operations, use the `globalOperations` resource.
3712 # - For regional operations, use the `regionOperations` resource.
3713 # - For zonal operations, use the `zonalOperations` resource.
3714 #
3715 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3716 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3717 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3718 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3719 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3720 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3721 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003722 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003723 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3724 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3725 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003726 },
3727 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003728 },
3729 &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`.
3730 &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.
3731 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3732 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3733 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3734 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003735 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003736 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3737 &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.
3738 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3739 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3740 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3741 &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.
3742 &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`.
3743 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3744 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3745 &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.
3746 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3747 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3748 {
3749 &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.
3750 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3751 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3752 {
3753 &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).
3754 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3755 },
3756 ],
3757 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3758 },
3759 ],
3760 &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.
3761}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003762</div>
3763
3764</body></html>