blob: 92d8c573a17e35c3b47ebaf8c6aca9c6afe777eb [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instanceGroupManagers.html">instanceGroupManagers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070078 <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
79<p class="firstline">Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070081 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070087 <code><a href="#applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070088<p class="firstline">Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.</p>
89<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code><a href="#close">close()</a></code></p>
91<p class="firstline">Close httplib2 connections.</p>
92<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070093 <code><a href="#createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -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">
yoshi-code-botc3f86752021-06-12 00:20:02 -070096 <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
97<p class="firstline">Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070098<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070099 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
100<p class="firstline">Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700102 <code><a href="#deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<p class="firstline">Deletes selected per-instance configs for the managed instance group.</p>
104<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700105 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700107<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700108 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
109<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700111 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700112<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
113<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700114 <code><a href="#listErrors">listErrors(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700115<p class="firstline">Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700116<p class="toc_element">
117 <code><a href="#listErrors_next">listErrors_next(previous_request, previous_response)</a></code></p>
118<p class="firstline">Retrieves the next page of results.</p>
119<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700120 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700121<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
124<p class="firstline">Retrieves the next page of results.</p>
125<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700126 <code><a href="#listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -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>
128<p class="toc_element">
129 <code><a href="#listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -0700132 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
133<p class="firstline">Retrieves the next page of results.</p>
134<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700135 <code><a href="#patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700137<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700138 <code><a href="#patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700139<p class="firstline">Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.</p>
140<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700141 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
142<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700144 <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
145<p class="firstline">Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700146<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700147 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700148<p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700149<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700150 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800151<p class="firstline">Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.</p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700152<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700153 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700154<p class="firstline">Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700155<h3>Method Details</h3>
156<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700157 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
158 <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.
159
160If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
161
162You can specify a maximum of 1000 instances with this method per request.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400163
Takashi Matsuo06694102015-09-11 13:55:40 -0700164Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 project: string, Project ID for this request. (required)
166 zone: string, The name of the zone where the managed instance group is located. (required)
167 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700169 The object takes the form of:
170
171{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800172 &quot;instances&quot;: [ # The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
173 &quot;A String&quot;,
174 ],
175}
Takashi Matsuo06694102015-09-11 13:55:40 -0700176
yoshi-code-botc3f86752021-06-12 00:20:02 -0700177 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
178
179For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
180
181The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700182
183Returns:
184 An object of the form:
185
yoshi-code-botc3f86752021-06-12 00:20:02 -0700186 { # Represents an Operation resource.
187 #
188 # Google Compute Engine has three Operation resources:
189 #
190 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
191 #
192 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
193 #
194 # Operations can be global, regional or zonal.
195 # - For global operations, use the `globalOperations` resource.
196 # - For regional operations, use the `regionOperations` resource.
197 # - For zonal operations, use the `zonalOperations` resource.
198 #
199 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800200 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
201 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
202 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
203 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
204 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
205 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800207 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
208 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
209 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 },
211 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800212 },
213 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
214 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
215 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
216 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
217 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
218 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800219 &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 -0800220 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
221 &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.
222 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
223 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
224 &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.
225 &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`.
226 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
227 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
228 &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.
229 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
230 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
231 {
232 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700233 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
234 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800235 {
236 &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).
237 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
238 },
239 ],
240 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
241 },
242 ],
243 &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.
244}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700245</div>
246
247<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700248 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800249 <pre>Retrieves the list of managed instance groups and groups them by zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700250
251Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800252 project: string, Project ID for this request. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -0700253 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;`.
254
255For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
256
257You 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.
258
259To 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 -0700260 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 -0700261 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`)
yoshi-code-botc3f86752021-06-12 00:20:02 -0700262 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
263
264You 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.
265
266Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 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 -0800268 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Takashi Matsuo06694102015-09-11 13:55:40 -0700269
270Returns:
271 An object of the form:
272
273 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800274 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
275 &quot;items&quot;: { # A list of InstanceGroupManagersScopedList resources.
276 &quot;a_key&quot;: { # [Output Only] The name of the scope that contains this set of managed instance groups.
277 &quot;instanceGroupManagers&quot;: [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700278 { # 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 =========================================================================
279 #
280 # Represents a Managed Instance Group resource.
281 #
282 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
283 #
284 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
285 #
286 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800287 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700288 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800289 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
290 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Takashi Matsuo06694102015-09-11 13:55:40 -0700291 },
292 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800293 &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.
294 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
295 &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.
296 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700297 &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.
298 #
299 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800300 &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.
301 &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.
302 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
303 &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.
304 &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.
305 &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.
306 &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.
307 },
308 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
309 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400310 &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 -0800311 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
312 {
313 &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.
314 },
315 ],
316 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700317 &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.
318 #
319 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800320 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
321 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
322 &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.
323 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
324 &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.
325 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700326 { # The named port. For example: .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800327 &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.
328 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
329 },
330 ],
331 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
332 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
333 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
334 &quot;preservedState&quot;: { # Configuration of preserved resources.
335 &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.
336 &quot;a_key&quot;: {
337 &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.
338 },
339 },
340 },
341 },
342 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
343 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
344 &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.
345 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
346 &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.
347 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
348 &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.
349 },
350 },
351 &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.
352 &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.
353 },
354 },
355 &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.
356 &quot;A String&quot;,
357 ],
358 &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.
359 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700360 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
361 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
362 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
363 &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 if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
364 #
365 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
366 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
367 #
368 #
369 # - If the value is fixed, then the calculated value is equal to the fixed value.
370 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800371 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
372 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
373 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700374 &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:
375 #
376 #
377 # - The instance&#x27;s status is RUNNING.
378 # - 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 if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
379 #
380 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
381 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
382 #
383 #
384 # - If the value is fixed, then the calculated value is equal to the fixed value.
385 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800386 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
387 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
388 },
389 &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.
390 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
391 &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).
392 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700393 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
394 #
395 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800396 {
397 &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.
398 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700399 &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:
400 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
401 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
402 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
403 #
404 #
405 # - If the value is fixed, then the calculated value is equal to the fixed value.
406 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800407 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
408 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
409 },
410 },
411 ],
412 &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 -0700413 },
414 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800415 &quot;warning&quot;: { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
416 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700417 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
418 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800419 {
420 &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).
421 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
422 },
423 ],
424 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
425 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800427 },
428 &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.
429 &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.
430 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
431 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
432 &quot;A String&quot;,
433 ],
434 &quot;warning&quot;: { # [Output Only] Informational warning message.
435 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700436 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
437 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800438 {
439 &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).
440 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
441 },
442 ],
443 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
444 },
445}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700446</div>
447
448<div class="method">
449 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
450 <pre>Retrieves the next page of results.
451
452Args:
453 previous_request: The request for the previous page. (required)
454 previous_response: The response from the request for the previous page. (required)
455
456Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700458 page. Returns None if there are no more items in the collection.
459 </pre>
460</div>
461
462<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700463 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 <pre>Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
465
466Args:
467 project: string, Project ID for this request. (required)
468 zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
469 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
470 body: object, The request body.
471 The object takes the form of:
472
473{ # InstanceGroupManagers.applyUpdatesToInstances
yoshi-code-botc3f86752021-06-12 00:20:02 -0700474 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800475 &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].
476 &quot;A String&quot;,
477 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700478 &quot;minimalAction&quot;: &quot;A String&quot;, # The minimal action that you want to perform on each instance during the update:
479 # - REPLACE: At minimum, delete the instance and create it again.
480 # - RESTART: Stop the instance and start it again.
481 # - REFRESH: Do not stop the instance.
482 # - 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.
483 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # The most disruptive action that you want to perform on each instance during the update:
484 # - REPLACE: Delete the instance and create it again.
485 # - RESTART: Stop the instance and start it again.
486 # - REFRESH: Do not stop the instance.
487 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800488}
Dan O'Mearadd494642020-05-01 07:42:23 -0700489
490
491Returns:
492 An object of the form:
493
yoshi-code-botc3f86752021-06-12 00:20:02 -0700494 { # Represents an Operation resource.
495 #
496 # Google Compute Engine has three Operation resources:
497 #
498 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
499 #
500 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
501 #
502 # Operations can be global, regional or zonal.
503 # - For global operations, use the `globalOperations` resource.
504 # - For regional operations, use the `regionOperations` resource.
505 # - For zonal operations, use the `zonalOperations` resource.
506 #
507 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800508 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
509 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
510 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
511 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
512 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
513 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700514 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800515 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
516 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
517 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700518 },
519 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800520 },
521 &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`.
522 &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.
523 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
524 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
525 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
526 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800527 &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 -0800528 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
529 &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.
530 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
531 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
532 &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.
533 &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`.
534 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
535 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
536 &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.
537 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
538 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
539 {
540 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700541 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
542 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800543 {
544 &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).
545 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
546 },
547 ],
548 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
549 },
550 ],
551 &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.
552}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700553</div>
554
555<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700556 <code class="details" id="close">close()</code>
557 <pre>Close httplib2 connections.</pre>
558</div>
559
560<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700561 <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700562 <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.
563
564Args:
565 project: string, Project ID for this request. (required)
566 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
567 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
568 body: object, The request body.
569 The object takes the form of:
570
571{ # InstanceGroupManagers.createInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800572 &quot;instances&quot;: [ # [Required] List of specifications of per-instance configs.
573 {
574 &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.
575 &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.
576 &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.
577 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
578 &quot;a_key&quot;: {
579 &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.
580 &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.
581 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700582 },
583 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800584 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
585 &quot;a_key&quot;: &quot;A String&quot;,
586 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800588 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
589 },
590 ],
591}
Dan O'Mearadd494642020-05-01 07:42:23 -0700592
yoshi-code-botc3f86752021-06-12 00:20:02 -0700593 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.
594
595For 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.
596
597The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Dan O'Mearadd494642020-05-01 07:42:23 -0700598
599Returns:
600 An object of the form:
601
yoshi-code-botc3f86752021-06-12 00:20:02 -0700602 { # Represents an Operation resource.
603 #
604 # Google Compute Engine has three Operation resources:
605 #
606 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
607 #
608 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
609 #
610 # Operations can be global, regional or zonal.
611 # - For global operations, use the `globalOperations` resource.
612 # - For regional operations, use the `regionOperations` resource.
613 # - For zonal operations, use the `zonalOperations` resource.
614 #
615 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800616 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
617 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
618 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
619 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
620 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
621 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800623 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
624 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
625 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 },
627 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800628 },
629 &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`.
630 &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.
631 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
632 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
633 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
634 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800635 &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 -0800636 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
637 &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.
638 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
639 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
640 &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.
641 &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`.
642 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
643 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
644 &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.
645 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
646 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
647 {
648 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700649 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
650 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800651 {
652 &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).
653 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
654 },
655 ],
656 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
657 },
658 ],
659 &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.
660}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700661</div>
662
663<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700664 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
665 <pre>Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
Takashi Matsuo06694102015-09-11 13:55:40 -0700666
667Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800668 project: string, Project ID for this request. (required)
669 zone: string, The name of the zone where the managed instance group is located. (required)
670 instanceGroupManager: string, The name of the managed instance group to delete. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -0700671 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.
672
673For 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.
674
675The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700676
677Returns:
678 An object of the form:
679
yoshi-code-botc3f86752021-06-12 00:20:02 -0700680 { # Represents an Operation resource.
681 #
682 # Google Compute Engine has three Operation resources:
683 #
684 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
685 #
686 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
687 #
688 # Operations can be global, regional or zonal.
689 # - For global operations, use the `globalOperations` resource.
690 # - For regional operations, use the `regionOperations` resource.
691 # - For zonal operations, use the `zonalOperations` resource.
692 #
693 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800694 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
695 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
696 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
697 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
698 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
699 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800701 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
702 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
703 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 },
705 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800706 },
707 &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`.
708 &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.
709 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
710 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
711 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
712 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800713 &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 -0800714 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
715 &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.
716 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
717 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
718 &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.
719 &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`.
720 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
721 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
722 &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.
723 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
724 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
725 {
726 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700727 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
728 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800729 {
730 &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).
731 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
732 },
733 ],
734 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
735 },
736 ],
737 &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.
738}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700739</div>
740
741<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700742 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
743 <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.
744
745If 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.
746
747You can specify a maximum of 1000 instances with this method per request.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400748
Takashi Matsuo06694102015-09-11 13:55:40 -0700749Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800750 project: string, Project ID for this request. (required)
751 zone: string, The name of the zone where the managed instance group is located. (required)
752 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700753 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700754 The object takes the form of:
755
756{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800757 &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].
758 &quot;A String&quot;,
759 ],
760}
Takashi Matsuo06694102015-09-11 13:55:40 -0700761
yoshi-code-botc3f86752021-06-12 00:20:02 -0700762 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.
763
764For 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.
765
766The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700767
768Returns:
769 An object of the form:
770
yoshi-code-botc3f86752021-06-12 00:20:02 -0700771 { # Represents an Operation resource.
772 #
773 # Google Compute Engine has three Operation resources:
774 #
775 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
776 #
777 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
778 #
779 # Operations can be global, regional or zonal.
780 # - For global operations, use the `globalOperations` resource.
781 # - For regional operations, use the `regionOperations` resource.
782 # - For zonal operations, use the `zonalOperations` resource.
783 #
784 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800785 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
786 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
787 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
788 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
789 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
790 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800792 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
793 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
794 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 },
796 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800797 },
798 &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`.
799 &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.
800 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
801 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
802 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
803 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800804 &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 -0800805 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
806 &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.
807 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
808 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
809 &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.
810 &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`.
811 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
812 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
813 &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.
814 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
815 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
816 {
817 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700818 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
819 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800820 {
821 &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).
822 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
823 },
824 ],
825 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
826 },
827 ],
828 &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.
829}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700830</div>
831
832<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700833 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700834 <pre>Deletes selected per-instance configs for the managed instance group.
835
836Args:
837 project: string, Project ID for this request. (required)
838 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
839 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
840 body: object, The request body.
841 The object takes the form of:
842
843{ # InstanceGroupManagers.deletePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800844 &quot;names&quot;: [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
845 &quot;A String&quot;,
846 ],
847}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700848
849
850Returns:
851 An object of the form:
852
yoshi-code-botc3f86752021-06-12 00:20:02 -0700853 { # Represents an Operation resource.
854 #
855 # Google Compute Engine has three Operation resources:
856 #
857 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
858 #
859 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
860 #
861 # Operations can be global, regional or zonal.
862 # - For global operations, use the `globalOperations` resource.
863 # - For regional operations, use the `regionOperations` resource.
864 # - For zonal operations, use the `zonalOperations` resource.
865 #
866 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800867 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
868 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
869 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
870 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
871 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
872 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700873 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800874 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
875 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
876 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700877 },
878 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800879 },
880 &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`.
881 &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.
882 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
883 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
884 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
885 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800886 &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 -0800887 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
888 &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.
889 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
890 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
891 &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.
892 &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`.
893 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
894 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
895 &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.
896 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
897 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
898 {
899 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700900 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
901 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800902 {
903 &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).
904 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
905 },
906 ],
907 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
908 },
909 ],
910 &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.
911}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700912</div>
913
914<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700915 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 <pre>Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700917
918Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800919 project: string, Project ID for this request. (required)
920 zone: string, The name of the zone where the managed instance group is located. (required)
921 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700922
923Returns:
924 An object of the form:
925
yoshi-code-botc3f86752021-06-12 00:20:02 -0700926 { # 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 =========================================================================
927 #
928 # Represents a Managed Instance Group resource.
929 #
930 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
931 #
932 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
933 #
934 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800935 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
936 {
937 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
938 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800940 ],
941 &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.
942 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
943 &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.
944 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700945 &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.
946 #
947 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800948 &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.
949 &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.
950 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
951 &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.
952 &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.
953 &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.
954 &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.
955 },
956 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
957 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400958 &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 -0800959 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
960 {
961 &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 -0700962 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800964 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700965 &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.
966 #
967 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800968 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
969 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
970 &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.
971 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
972 &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.
973 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700974 { # The named port. For example: .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800975 &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.
976 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
977 },
978 ],
979 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
980 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
981 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
982 &quot;preservedState&quot;: { # Configuration of preserved resources.
983 &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.
984 &quot;a_key&quot;: {
985 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700986 },
987 },
988 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800989 },
990 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
991 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
992 &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.
993 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
994 &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.
995 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
996 &quot;allEffective&quot;: True or False, # A bit indicating if all of the group&#x27;s per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
Bu Sun Kim65020912020-05-20 12:08:20 -0700997 },
998 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800999 &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.
1000 &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.
1001 },
1002 },
1003 &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.
1004 &quot;A String&quot;,
1005 ],
1006 &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.
1007 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001008 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1009 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1010 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1011 &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 if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
1012 #
1013 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1014 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1015 #
1016 #
1017 # - If the value is fixed, then the calculated value is equal to the fixed value.
1018 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001019 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1020 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1021 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001022 &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:
1023 #
1024 #
1025 # - The instance&#x27;s status is RUNNING.
1026 # - 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 if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
1027 #
1028 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1029 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1030 #
1031 #
1032 # - If the value is fixed, then the calculated value is equal to the fixed value.
1033 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001034 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1035 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1036 },
1037 &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.
1038 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1039 &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).
1040 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001041 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1042 #
1043 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001044 {
1045 &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.
1046 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001047 &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:
1048 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1049 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1050 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1051 #
1052 #
1053 # - If the value is fixed, then the calculated value is equal to the fixed value.
1054 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001055 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1056 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1057 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001058 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001059 ],
1060 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
1061}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001062</div>
1063
1064<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001065 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
1066 <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.
1067
1068A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001069
Takashi Matsuo06694102015-09-11 13:55:40 -07001070Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001071 project: string, Project ID for this request. (required)
1072 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 -07001073 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001074 The object takes the form of:
1075
yoshi-code-botc3f86752021-06-12 00:20:02 -07001076{ # 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 =========================================================================
1077 #
1078 # Represents a Managed Instance Group resource.
1079 #
1080 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1081 #
1082 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1083 #
1084 # 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 -07001085 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
1086 {
1087 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1088 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001089 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001090 ],
1091 &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.
1092 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1093 &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.
1094 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001095 &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.
1096 #
1097 # 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 -07001098 &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.
1099 &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.
1100 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1101 &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.
1102 &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.
1103 &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.
1104 &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.
1105 },
1106 &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 -07001107 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001108 &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 -07001109 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001110 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001111 &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 -07001112 },
1113 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001115 &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.
1116 #
1117 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Bu Sun Kim65020912020-05-20 12:08:20 -07001118 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1119 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001120 &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 -07001121 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1122 &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.
1123 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001124 { # The named port. For example: .
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &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.
1126 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001127 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 ],
1129 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1130 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001131 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1132 &quot;preservedState&quot;: { # Configuration of preserved resources.
1133 &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.
1134 &quot;a_key&quot;: {
1135 &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.
1136 },
1137 },
1138 },
1139 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1141 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1142 &quot;isStable&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001143 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1144 &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.
1145 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1146 &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.
1147 },
1148 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001149 &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.
1150 &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.
1151 },
1152 },
1153 &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.
1154 &quot;A String&quot;,
1155 ],
1156 &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.
1157 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001158 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1159 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1160 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1161 &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 if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
1162 #
1163 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1164 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1165 #
1166 #
1167 # - If the value is fixed, then the calculated value is equal to the fixed value.
1168 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded.
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1170 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1171 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001172 &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:
1173 #
1174 #
1175 # - The instance&#x27;s status is RUNNING.
1176 # - 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 if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
1177 #
1178 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1179 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1180 #
1181 #
1182 # - If the value is fixed, then the calculated value is equal to the fixed value.
1183 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001184 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1185 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1186 },
1187 &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.
1188 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1189 &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).
1190 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001191 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1192 #
1193 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001195 &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 -07001196 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001197 &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:
1198 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1199 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1200 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1201 #
1202 #
1203 # - If the value is fixed, then the calculated value is equal to the fixed value.
1204 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1206 &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 -07001207 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001208 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001209 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001210 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim65020912020-05-20 12:08:20 -07001211}
Takashi Matsuo06694102015-09-11 13:55:40 -07001212
yoshi-code-botc3f86752021-06-12 00:20:02 -07001213 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.
1214
1215For 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.
1216
1217The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07001218
1219Returns:
1220 An object of the form:
1221
yoshi-code-botc3f86752021-06-12 00:20:02 -07001222 { # Represents an Operation resource.
1223 #
1224 # Google Compute Engine has three Operation resources:
1225 #
1226 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1227 #
1228 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1229 #
1230 # Operations can be global, regional or zonal.
1231 # - For global operations, use the `globalOperations` resource.
1232 # - For regional operations, use the `regionOperations` resource.
1233 # - For zonal operations, use the `zonalOperations` resource.
1234 #
1235 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001236 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1237 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1238 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1239 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1240 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1241 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001242 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001243 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1244 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1245 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 },
1247 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001248 },
1249 &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`.
1250 &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.
1251 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1252 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1253 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1254 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001255 &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 -08001256 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1257 &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.
1258 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1259 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1260 &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.
1261 &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`.
1262 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1263 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1264 &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.
1265 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1266 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1267 {
1268 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001269 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1270 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001271 {
1272 &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).
1273 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1274 },
1275 ],
1276 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1277 },
1278 ],
1279 &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.
1280}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001281</div>
1282
1283<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001284 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001285 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1286
1287Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001288 project: string, Project ID for this request. (required)
1289 zone: string, The name of the zone where the managed instance group is located. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001290 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;`.
1291
1292For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1293
1294You 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.
1295
1296To 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) ```
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 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`)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001298 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1299
1300You 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.
1301
1302Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07001303 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 -08001304 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Takashi Matsuo06694102015-09-11 13:55:40 -07001305
1306Returns:
1307 An object of the form:
1308
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001309 { # [Output Only] A list of managed instance groups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001310 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1311 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001312 { # 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 =========================================================================
1313 #
1314 # Represents a Managed Instance Group resource.
1315 #
1316 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1317 #
1318 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1319 #
1320 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001321 &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 -07001322 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001323 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1324 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001325 },
1326 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001327 &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.
1328 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1329 &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.
1330 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001331 &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.
1332 #
1333 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001334 &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.
1335 &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.
1336 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1337 &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.
1338 &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.
1339 &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.
1340 &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.
1341 },
1342 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1343 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001344 &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 -08001345 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1346 {
1347 &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.
1348 },
1349 ],
1350 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001351 &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.
1352 #
1353 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001354 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1355 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1356 &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.
1357 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1358 &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.
1359 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001360 { # The named port. For example: .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001361 &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.
1362 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1363 },
1364 ],
1365 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1366 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1367 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1368 &quot;preservedState&quot;: { # Configuration of preserved resources.
1369 &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.
1370 &quot;a_key&quot;: {
1371 &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.
1372 },
1373 },
1374 },
1375 },
1376 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1377 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1378 &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.
1379 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1380 &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.
1381 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1382 &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.
1383 },
1384 },
1385 &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.
1386 &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.
1387 },
1388 },
1389 &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.
1390 &quot;A String&quot;,
1391 ],
1392 &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.
1393 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001394 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1395 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1396 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1397 &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 if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
1398 #
1399 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1400 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1401 #
1402 #
1403 # - If the value is fixed, then the calculated value is equal to the fixed value.
1404 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001405 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1406 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1407 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001408 &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:
1409 #
1410 #
1411 # - The instance&#x27;s status is RUNNING.
1412 # - 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 if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
1413 #
1414 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1415 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1416 #
1417 #
1418 # - If the value is fixed, then the calculated value is equal to the fixed value.
1419 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001420 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1421 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1422 },
1423 &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.
1424 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1425 &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).
1426 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001427 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1428 #
1429 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001430 {
1431 &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.
1432 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001433 &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:
1434 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1435 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1436 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1437 #
1438 #
1439 # - If the value is fixed, then the calculated value is equal to the fixed value.
1440 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001441 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1442 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1443 },
1444 },
1445 ],
1446 &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 -07001447 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001448 ],
1449 &quot;kind&quot;: &quot;compute#instanceGroupManagerList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1450 &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.
1451 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1452 &quot;warning&quot;: { # [Output Only] Informational warning message.
1453 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001454 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1455 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001456 {
1457 &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).
1458 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1459 },
1460 ],
1461 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1462 },
1463}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001464</div>
1465
1466<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001467 <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 -07001468 <pre>Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001469
1470Args:
1471 project: string, Project ID for this request. (required)
1472 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001473 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)
1474 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;`.
1475
1476For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1477
1478You 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.
1479
1480To 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) ```
Bu Sun Kim65020912020-05-20 12:08:20 -07001481 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`)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001482 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1483
1484You 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.
1485
1486Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07001487 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 -08001488 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07001489
1490Returns:
1491 An object of the form:
1492
1493 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001494 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
1495 {
1496 &quot;error&quot;: { # [Output Only] Contents of the error.
1497 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1498 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001499 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001500 &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.
1501 &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:
1502 &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.
1503 &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.
1504 &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 }.
1505 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1506 },
1507 },
1508 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1509 },
1510 ],
1511 &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.
1512}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001513</div>
1514
1515<div class="method">
1516 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1517 <pre>Retrieves the next page of results.
1518
1519Args:
1520 previous_request: The request for the previous page. (required)
1521 previous_response: The response from the request for the previous page. (required)
1522
1523Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001524 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001525 page. Returns None if there are no more items in the collection.
1526 </pre>
1527</div>
1528
1529<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001530 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001531 <pre>Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.
Takashi Matsuo06694102015-09-11 13:55:40 -07001532
1533Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001534 project: string, Project ID for this request. (required)
1535 zone: string, The name of the zone where the managed instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001536 instanceGroupManager: string, The name of the managed instance group. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001537 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;`.
1538
1539For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1540
1541You 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.
1542
1543To 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) ```
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 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`)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001545 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1546
1547You 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.
1548
1549Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07001550 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 -08001551 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Takashi Matsuo06694102015-09-11 13:55:40 -07001552
1553Returns:
1554 An object of the form:
1555
1556 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001557 &quot;managedInstances&quot;: [ # [Output Only] The list of instances in the managed instance group.
1558 { # A Managed Instance resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001559 &quot;currentAction&quot;: &quot;A String&quot;, # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1560 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1561 # - 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.
1562 # - 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.
1563 # - RECREATING The managed instance group is recreating this instance.
1564 # - DELETING The managed instance group is permanently deleting this instance.
1565 # - 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.
1566 # - RESTARTING The managed instance group is restarting the instance.
1567 # - 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.
1568 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001569 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1570 &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.
1571 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1572 {
1573 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1574 &quot;healthCheck&quot;: &quot;A String&quot;, # [Output Only] The URL for the health check that verifies whether the instance is healthy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001575 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001576 ],
1577 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1578 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1579 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1580 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1581 {
1582 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1583 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1584 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001585 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001586 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001587 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001588 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001589 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1590 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1591 &quot;a_key&quot;: {
1592 &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.
1593 &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.
1594 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1595 },
1596 },
1597 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1598 &quot;a_key&quot;: &quot;A String&quot;,
1599 },
1600 },
1601 &quot;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1602 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1603 &quot;a_key&quot;: {
1604 &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.
1605 &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.
1606 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1607 },
1608 },
1609 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1610 &quot;a_key&quot;: &quot;A String&quot;,
1611 },
1612 },
1613 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1614 &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 }.
1615 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1616 },
1617 },
1618 ],
1619 &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.
1620}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001621</div>
1622
1623<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001624 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1625 <pre>Retrieves the next page of results.
1626
1627Args:
1628 previous_request: The request for the previous page. (required)
1629 previous_response: The response from the request for the previous page. (required)
1630
1631Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001632 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001633 page. Returns None if there are no more items in the collection.
1634 </pre>
1635</div>
1636
1637<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001638 <code class="details" id="listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001639 <pre>Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
1640
1641Args:
1642 project: string, Project ID for this request. (required)
1643 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1644 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001645 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;`.
1646
1647For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1648
1649You 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.
1650
1651To 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) ```
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001652 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`)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001653 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1654
1655You 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.
1656
1657Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001658 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 -08001659 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001660
1661Returns:
1662 An object of the form:
1663
1664 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001665 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
1666 {
1667 &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.
1668 &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.
1669 &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.
1670 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1671 &quot;a_key&quot;: {
1672 &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.
1673 &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.
1674 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001675 },
1676 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001677 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1678 &quot;a_key&quot;: &quot;A String&quot;,
1679 },
1680 },
1681 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1682 },
1683 ],
1684 &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.
1685 &quot;warning&quot;: { # [Output Only] Informational warning message.
1686 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001687 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1688 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001689 {
1690 &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).
1691 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001692 },
1693 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001694 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1695 },
1696}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001697</div>
1698
1699<div class="method">
1700 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1701 <pre>Retrieves the next page of results.
1702
1703Args:
1704 previous_request: The request for the previous page. (required)
1705 previous_response: The response from the request for the previous page. (required)
1706
1707Returns:
1708 A request object that you can call &#x27;execute()&#x27; on to request the next
1709 page. Returns None if there are no more items in the collection.
1710 </pre>
1711</div>
1712
1713<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -07001714 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1715 <pre>Retrieves the next page of results.
1716
1717Args:
1718 previous_request: The request for the previous page. (required)
1719 previous_response: The response from the request for the previous page. (required)
1720
1721Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001722 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -07001723 page. Returns None if there are no more items in the collection.
1724 </pre>
1725</div>
1726
1727<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001728 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001729 <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.
1730
1731Args:
1732 project: string, Project ID for this request. (required)
1733 zone: string, The name of the zone where you want to create the managed instance group. (required)
1734 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001735 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001736 The object takes the form of:
1737
yoshi-code-botc3f86752021-06-12 00:20:02 -07001738{ # 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 =========================================================================
1739 #
1740 # Represents a Managed Instance Group resource.
1741 #
1742 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1743 #
1744 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1745 #
1746 # 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 -07001747 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
1748 {
1749 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1750 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001751 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001752 ],
1753 &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.
1754 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1755 &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.
1756 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001757 &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.
1758 #
1759 # 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 -07001760 &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.
1761 &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.
1762 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1763 &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.
1764 &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.
1765 &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.
1766 &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.
1767 },
1768 &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 -07001769 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001770 &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 -07001771 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001772 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001773 &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 -07001774 },
1775 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001776 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001777 &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.
1778 #
1779 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Bu Sun Kim65020912020-05-20 12:08:20 -07001780 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1781 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001782 &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 -07001783 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1784 &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.
1785 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001786 { # The named port. For example: .
Bu Sun Kim65020912020-05-20 12:08:20 -07001787 &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.
1788 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001789 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001790 ],
1791 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1792 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001793 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1794 &quot;preservedState&quot;: { # Configuration of preserved resources.
1795 &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.
1796 &quot;a_key&quot;: {
1797 &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.
1798 },
1799 },
1800 },
1801 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001802 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1803 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1804 &quot;isStable&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001805 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1806 &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.
1807 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1808 &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.
1809 },
1810 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001811 &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.
1812 &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.
1813 },
1814 },
1815 &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.
1816 &quot;A String&quot;,
1817 ],
1818 &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.
1819 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001820 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1821 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1822 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1823 &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 if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
1824 #
1825 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1826 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1827 #
1828 #
1829 # - If the value is fixed, then the calculated value is equal to the fixed value.
1830 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001831 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1832 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1833 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001834 &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:
1835 #
1836 #
1837 # - The instance&#x27;s status is RUNNING.
1838 # - 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 if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
1839 #
1840 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1841 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1842 #
1843 #
1844 # - If the value is fixed, then the calculated value is equal to the fixed value.
1845 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001846 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1847 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1848 },
1849 &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.
1850 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1851 &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).
1852 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001853 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1854 #
1855 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001856 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001857 &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 -07001858 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001859 &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:
1860 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1861 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1862 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1863 #
1864 #
1865 # - If the value is fixed, then the calculated value is equal to the fixed value.
1866 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001867 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1868 &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 -07001869 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001870 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001871 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001872 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim65020912020-05-20 12:08:20 -07001873}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001874
yoshi-code-botc3f86752021-06-12 00:20:02 -07001875 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.
1876
1877For 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.
1878
1879The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001880
1881Returns:
1882 An object of the form:
1883
yoshi-code-botc3f86752021-06-12 00:20:02 -07001884 { # Represents an Operation resource.
1885 #
1886 # Google Compute Engine has three Operation resources:
1887 #
1888 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1889 #
1890 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1891 #
1892 # Operations can be global, regional or zonal.
1893 # - For global operations, use the `globalOperations` resource.
1894 # - For regional operations, use the `regionOperations` resource.
1895 # - For zonal operations, use the `zonalOperations` resource.
1896 #
1897 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001898 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1899 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1900 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1901 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1902 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1903 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001904 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001905 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1906 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1907 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001908 },
1909 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001910 },
1911 &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`.
1912 &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.
1913 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1914 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1915 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1916 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001917 &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 -08001918 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1919 &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.
1920 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1921 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1922 &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.
1923 &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`.
1924 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1925 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1926 &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.
1927 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1928 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1929 {
1930 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001931 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1932 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001933 {
1934 &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).
1935 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1936 },
1937 ],
1938 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1939 },
1940 ],
1941 &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.
1942}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001943</div>
1944
1945<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001946 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001947 <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.
1948
1949Args:
1950 project: string, Project ID for this request. (required)
1951 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1952 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1953 body: object, The request body.
1954 The object takes the form of:
1955
1956{ # InstanceGroupManagers.patchPerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001957 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
1958 {
1959 &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.
1960 &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.
1961 &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.
1962 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1963 &quot;a_key&quot;: {
1964 &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.
1965 &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.
1966 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001967 },
1968 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001969 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1970 &quot;a_key&quot;: &quot;A String&quot;,
1971 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001972 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001973 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1974 },
1975 ],
1976}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001977
yoshi-code-botc3f86752021-06-12 00:20:02 -07001978 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.
1979
1980For 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.
1981
1982The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001983
1984Returns:
1985 An object of the form:
1986
yoshi-code-botc3f86752021-06-12 00:20:02 -07001987 { # Represents an Operation resource.
1988 #
1989 # Google Compute Engine has three Operation resources:
1990 #
1991 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1992 #
1993 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1994 #
1995 # Operations can be global, regional or zonal.
1996 # - For global operations, use the `globalOperations` resource.
1997 # - For regional operations, use the `regionOperations` resource.
1998 # - For zonal operations, use the `zonalOperations` resource.
1999 #
2000 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002001 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2002 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2003 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2004 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2005 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2006 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002007 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002008 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2009 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2010 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002011 },
2012 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002013 },
2014 &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`.
2015 &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.
2016 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2017 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2018 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2019 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002020 &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 -08002021 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2022 &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.
2023 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2024 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2025 &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.
2026 &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`.
2027 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2028 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2029 &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.
2030 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2031 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2032 {
2033 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07002034 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2035 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002036 {
2037 &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).
2038 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2039 },
2040 ],
2041 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2042 },
2043 ],
2044 &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.
2045}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002046</div>
2047
2048<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07002049 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2050 <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.
2051
2052If 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.
2053
2054You can specify a maximum of 1000 instances with this method per request.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002055
Takashi Matsuo06694102015-09-11 13:55:40 -07002056Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002057 project: string, Project ID for this request. (required)
2058 zone: string, The name of the zone where the managed instance group is located. (required)
2059 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002060 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07002061 The object takes the form of:
2062
2063{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002064 &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].
2065 &quot;A String&quot;,
2066 ],
2067}
Takashi Matsuo06694102015-09-11 13:55:40 -07002068
yoshi-code-botc3f86752021-06-12 00:20:02 -07002069 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.
2070
2071For 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.
2072
2073The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002074
2075Returns:
2076 An object of the form:
2077
yoshi-code-botc3f86752021-06-12 00:20:02 -07002078 { # Represents an Operation resource.
2079 #
2080 # Google Compute Engine has three Operation resources:
2081 #
2082 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2083 #
2084 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2085 #
2086 # Operations can be global, regional or zonal.
2087 # - For global operations, use the `globalOperations` resource.
2088 # - For regional operations, use the `regionOperations` resource.
2089 # - For zonal operations, use the `zonalOperations` resource.
2090 #
2091 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002092 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2093 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2094 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2095 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2096 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2097 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002098 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002099 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2100 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2101 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002102 },
2103 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002104 },
2105 &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`.
2106 &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.
2107 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2108 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2109 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2110 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002111 &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 -08002112 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2113 &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.
2114 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2115 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2116 &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.
2117 &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`.
2118 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2119 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2120 &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.
2121 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2122 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2123 {
2124 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07002125 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2126 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002127 {
2128 &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).
2129 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2130 },
2131 ],
2132 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2133 },
2134 ],
2135 &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.
2136}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002137</div>
2138
2139<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07002140 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
2141 <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.
2142
2143When 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:
2144
2145+ 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.
2146
2147This list is subject to change.
2148
2149If 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002150
Takashi Matsuo06694102015-09-11 13:55:40 -07002151Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002152 project: string, Project ID for this request. (required)
2153 zone: string, The name of the zone where the managed instance group is located. (required)
2154 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07002155 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)
yoshi-code-botc3f86752021-06-12 00:20:02 -07002156 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.
2157
2158For 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.
2159
2160The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002161
2162Returns:
2163 An object of the form:
2164
yoshi-code-botc3f86752021-06-12 00:20:02 -07002165 { # Represents an Operation resource.
2166 #
2167 # Google Compute Engine has three Operation resources:
2168 #
2169 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2170 #
2171 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2172 #
2173 # Operations can be global, regional or zonal.
2174 # - For global operations, use the `globalOperations` resource.
2175 # - For regional operations, use the `regionOperations` resource.
2176 # - For zonal operations, use the `zonalOperations` resource.
2177 #
2178 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002179 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2180 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2181 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2182 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2183 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2184 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002185 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002186 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2187 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2188 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002189 },
2190 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002191 },
2192 &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`.
2193 &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.
2194 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2195 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2196 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2197 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002198 &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 -08002199 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2200 &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.
2201 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2202 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2203 &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.
2204 &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`.
2205 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2206 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2207 &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.
2208 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2209 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2210 {
2211 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07002212 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2213 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002214 {
2215 &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).
2216 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2217 },
2218 ],
2219 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2220 },
2221 ],
2222 &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.
2223}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002224</div>
2225
2226<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07002227 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002228 <pre>Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Takashi Matsuo06694102015-09-11 13:55:40 -07002229
2230Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002231 project: string, Project ID for this request. (required)
2232 zone: string, The name of the zone where the managed instance group is located. (required)
2233 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002234 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07002235 The object takes the form of:
2236
2237{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002238 &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.
2239}
Takashi Matsuo06694102015-09-11 13:55:40 -07002240
yoshi-code-botc3f86752021-06-12 00:20:02 -07002241 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.
2242
2243For 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.
2244
2245The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002246
2247Returns:
2248 An object of the form:
2249
yoshi-code-botc3f86752021-06-12 00:20:02 -07002250 { # Represents an Operation resource.
2251 #
2252 # Google Compute Engine has three Operation resources:
2253 #
2254 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2255 #
2256 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2257 #
2258 # Operations can be global, regional or zonal.
2259 # - For global operations, use the `globalOperations` resource.
2260 # - For regional operations, use the `regionOperations` resource.
2261 # - For zonal operations, use the `zonalOperations` resource.
2262 #
2263 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002264 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2265 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2266 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2267 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2268 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2269 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002270 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002271 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2272 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2273 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002274 },
2275 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002276 },
2277 &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`.
2278 &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.
2279 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2280 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2281 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2282 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002283 &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 -08002284 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2285 &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.
2286 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2287 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2288 &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.
2289 &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`.
2290 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2291 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2292 &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.
2293 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2294 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2295 {
2296 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07002297 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2298 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002299 {
2300 &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).
2301 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2302 },
2303 ],
2304 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2305 },
2306 ],
2307 &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.
2308}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002309</div>
2310
2311<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07002312 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002313 <pre>Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
Takashi Matsuo06694102015-09-11 13:55:40 -07002314
2315Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002316 project: string, Project ID for this request. (required)
2317 zone: string, The name of the zone where the managed instance group is located. (required)
2318 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002319 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07002320 The object takes the form of:
2321
2322{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002323 &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.
2324 &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.
2325 &quot;A String&quot;,
2326 ],
2327}
Takashi Matsuo06694102015-09-11 13:55:40 -07002328
yoshi-code-botc3f86752021-06-12 00:20:02 -07002329 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.
2330
2331For 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.
2332
2333The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002334
2335Returns:
2336 An object of the form:
2337
yoshi-code-botc3f86752021-06-12 00:20:02 -07002338 { # Represents an Operation resource.
2339 #
2340 # Google Compute Engine has three Operation resources:
2341 #
2342 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2343 #
2344 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2345 #
2346 # Operations can be global, regional or zonal.
2347 # - For global operations, use the `globalOperations` resource.
2348 # - For regional operations, use the `regionOperations` resource.
2349 # - For zonal operations, use the `zonalOperations` resource.
2350 #
2351 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002352 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2353 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2354 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2355 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2356 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2357 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002358 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002359 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2360 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2361 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002362 },
2363 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002364 },
2365 &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`.
2366 &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.
2367 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2368 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2369 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2370 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002371 &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 -08002372 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2373 &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.
2374 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2375 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2376 &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.
2377 &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`.
2378 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2379 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2380 &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.
2381 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2382 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2383 {
2384 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07002385 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2386 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002387 {
2388 &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).
2389 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2390 },
2391 ],
2392 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2393 },
2394 ],
2395 &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.
2396}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002397</div>
2398
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002399<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07002400 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002401 <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.
2402
2403Args:
2404 project: string, Project ID for this request. (required)
2405 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2406 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2407 body: object, The request body.
2408 The object takes the form of:
2409
2410{ # InstanceGroupManagers.updatePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002411 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
2412 {
2413 &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.
2414 &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.
2415 &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.
2416 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2417 &quot;a_key&quot;: {
2418 &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.
2419 &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.
2420 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002421 },
2422 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002423 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2424 &quot;a_key&quot;: &quot;A String&quot;,
2425 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002426 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002427 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
2428 },
2429 ],
2430}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002431
yoshi-code-botc3f86752021-06-12 00:20:02 -07002432 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.
2433
2434For 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.
2435
2436The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002437
2438Returns:
2439 An object of the form:
2440
yoshi-code-botc3f86752021-06-12 00:20:02 -07002441 { # Represents an Operation resource.
2442 #
2443 # Google Compute Engine has three Operation resources:
2444 #
2445 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2446 #
2447 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2448 #
2449 # Operations can be global, regional or zonal.
2450 # - For global operations, use the `globalOperations` resource.
2451 # - For regional operations, use the `regionOperations` resource.
2452 # - For zonal operations, use the `zonalOperations` resource.
2453 #
2454 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002455 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2456 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2457 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2458 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2459 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2460 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002461 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002462 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2463 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2464 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002465 },
2466 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002467 },
2468 &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`.
2469 &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.
2470 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2471 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2472 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2473 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002474 &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 -08002475 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2476 &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.
2477 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2478 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2479 &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.
2480 &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`.
2481 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2482 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2483 &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.
2484 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2485 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2486 {
2487 &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.
yoshi-code-botc3f86752021-06-12 00:20:02 -07002488 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2489 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002490 {
2491 &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).
2492 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2493 },
2494 ],
2495 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2496 },
2497 ],
2498 &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.
2499}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002500</div>
2501
Takashi Matsuo06694102015-09-11 13:55:40 -07002502</body></html>