blob: e59649e368736028a2a7981a11c709f135f64130 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.regionInstanceGroupManagers.html">regionInstanceGroupManagers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#abandonInstances">abandonInstances(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#applyUpdatesToInstances">applyUpdatesToInstances(project, region, instanceGroupManager, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Apply updates to selected instances the managed instance group.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#createInstances">createInstances(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
88<p class="firstline">Creates instances with per-instance configs in this regional 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>
89<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#delete">delete(project, region, instanceGroupManager, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Deletes the specified managed instance group and all of the instances in that group.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#deleteInstances">deleteInstances(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Flags the specified instances in the managed instance group to be immediately deleted. 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. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#deletePerInstanceConfigs">deletePerInstanceConfigs(project, region, instanceGroupManager, body=None)</a></code></p>
97<p class="firstline">Deletes selected per-instance configs for the managed instance group.</p>
98<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070099 <code><a href="#get">get(project, region, instanceGroupManager)</a></code></p>
100<p class="firstline">Returns all of the details about the specified managed instance group.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Retrieves the list of managed instance groups that are contained within the specified region.</p>
107<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700108 <code><a href="#listErrors">listErrors(project, region, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700109<p class="firstline">Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700110<p class="toc_element">
111 <code><a href="#listErrors_next">listErrors_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 <code><a href="#listManagedInstances">listManagedInstances(project, region, 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 the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400117 <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
118<p class="firstline">Retrieves the next page of results.</p>
119<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120 <code><a href="#listPerInstanceConfigs">listPerInstanceConfigs(project, region, 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 per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700122<p class="toc_element">
123 <code><a href="#listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</a></code></p>
124<p class="firstline">Retrieves the next page of results.</p>
125<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700126 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
127<p class="firstline">Retrieves the next page of results.</p>
128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code><a href="#patch">patch(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#patchPerInstanceConfigs">patchPerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800133<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>
Dan O'Mearadd494642020-05-01 07:42:23 -0700134<p class="toc_element">
135 <code><a href="#recreateInstances">recreateInstances(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400136<p class="firstline">Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700137<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 <code><a href="#resize">resize(project, region, instanceGroupManager, size, requestId=None)</a></code></p>
139<p class="firstline">Changes the intended size of 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 one or more instances.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800142<p class="firstline">Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145<p class="firstline">Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.</p>
146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#setTargetPools">setTargetPools(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700148<p class="firstline">Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.</p>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700151<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#update">update(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700155<p class="toc_element">
156 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800157<p class="firstline">Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700158<h3>Method Details</h3>
159<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700160 <code class="details" id="abandonInstances">abandonInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161 <pre>Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700162
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400163If 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.
164
165You can specify a maximum of 1000 instances with this method per request.
166
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167Args:
168 project: string, Project ID for this request. (required)
169 region: string, Name of the region scoping this request. (required)
170 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172 The object takes the form of:
173
174{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800175 &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].
176 &quot;A String&quot;,
177 ],
178}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700179
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 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.
181
182For 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.
183
184The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185
186Returns:
187 An object of the form:
188
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800190 #
191 # Google Compute Engine has three Operation resources:
192 #
193 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
194 #
195 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
196 #
197 # Operations can be global, regional or zonal.
198 # - For global operations, use the `globalOperations` resource.
199 # - For regional operations, use the `regionOperations` resource.
200 # - For zonal operations, use the `zonalOperations` resource.
201 #
202 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
203 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
204 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
205 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
206 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
207 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
208 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800210 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
211 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
212 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 },
214 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800215 },
216 &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`.
217 &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.
218 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
219 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
220 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
221 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800222 &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 -0800223 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
224 &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.
225 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
226 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
227 &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.
228 &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`.
229 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
230 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
231 &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.
232 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
233 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
234 {
235 &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.
236 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
237 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
238 {
239 &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).
240 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
241 },
242 ],
243 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
244 },
245 ],
246 &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.
247}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700248</div>
249
250<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, region, instanceGroupManager, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 <pre>Apply updates to selected instances the managed instance group.
253
254Args:
255 project: string, Project ID for this request. (required)
256 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
257 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 The object takes the form of:
260
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700261{ # RegionInstanceGroupManagers.applyUpdatesToInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800262 &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.
263 &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].
264 &quot;A String&quot;,
265 ],
266 &quot;minimalAction&quot;: &quot;A String&quot;, # The minimal action that you want to perform on each instance during the update:
267 # - REPLACE: At minimum, delete the instance and create it again.
268 # - RESTART: Stop the instance and start it again.
269 # - REFRESH: Do not stop the instance.
270 # - 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.
271 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # The most disruptive action that you want to perform on each instance during the update:
272 # - REPLACE: Delete the instance and create it again.
273 # - RESTART: Stop the instance and start it again.
274 # - REFRESH: Do not stop the instance.
275 # - 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.
276}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277
278
279Returns:
280 An object of the form:
281
282 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800283 #
284 # Google Compute Engine has three Operation resources:
285 #
286 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
287 #
288 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
289 #
290 # Operations can be global, regional or zonal.
291 # - For global operations, use the `globalOperations` resource.
292 # - For regional operations, use the `regionOperations` resource.
293 # - For zonal operations, use the `zonalOperations` resource.
294 #
295 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
296 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
297 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
298 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
299 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
300 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
301 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800303 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
304 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
305 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 },
307 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800308 },
309 &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`.
310 &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.
311 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
312 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
313 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
314 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800315 &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 -0800316 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
317 &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.
318 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
319 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
320 &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.
321 &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`.
322 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
323 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
324 &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.
325 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
326 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
327 {
328 &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.
329 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
330 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
331 {
332 &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).
333 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
334 },
335 ],
336 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
337 },
338 ],
339 &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.
340}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700341</div>
342
343<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700344 <code class="details" id="close">close()</code>
345 <pre>Close httplib2 connections.</pre>
346</div>
347
348<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 <code class="details" id="createInstances">createInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
350 <pre>Creates instances with per-instance configs in this regional 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.
351
352Args:
353 project: string, Project ID for this request. (required)
354 region: string, The name of the region where the managed instance group is located. It should conform to RFC1035. (required)
355 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
356 body: object, The request body.
357 The object takes the form of:
358
359{ # RegionInstanceGroupManagers.createInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800360 &quot;instances&quot;: [ # [Required] List of specifications of per-instance configs.
361 {
362 &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.
363 &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.
364 &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.
365 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
366 &quot;a_key&quot;: {
367 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update, 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.
368 &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.
369 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 },
371 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800372 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
373 &quot;a_key&quot;: &quot;A String&quot;,
374 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700375 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800376 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
377 },
378 ],
379}
Dan O'Mearadd494642020-05-01 07:42:23 -0700380
381 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.
382
383For 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.
384
385The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
386
387Returns:
388 An object of the form:
389
390 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800391 #
392 # Google Compute Engine has three Operation resources:
393 #
394 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
395 #
396 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
397 #
398 # Operations can be global, regional or zonal.
399 # - For global operations, use the `globalOperations` resource.
400 # - For regional operations, use the `regionOperations` resource.
401 # - For zonal operations, use the `zonalOperations` resource.
402 #
403 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
404 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
405 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
406 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
407 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
408 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
409 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
412 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
413 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700414 },
415 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800416 },
417 &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`.
418 &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.
419 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
420 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
421 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
422 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800423 &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 -0800424 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
425 &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.
426 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
427 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
428 &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.
429 &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`.
430 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
431 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
432 &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.
433 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
434 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
435 {
436 &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.
437 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
438 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
439 {
440 &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).
441 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
442 },
443 ],
444 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
445 },
446 ],
447 &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.
448}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449</div>
450
451<div class="method">
452 <code class="details" id="delete">delete(project, region, instanceGroupManager, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700453 <pre>Deletes the specified managed instance group and all of the instances in that group.
454
455Args:
456 project: string, Project ID for this request. (required)
457 region: string, Name of the region scoping this request. (required)
458 instanceGroupManager: string, Name of the managed instance group to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 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.
460
461For 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.
462
463The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700464
465Returns:
466 An object of the form:
467
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800469 #
470 # Google Compute Engine has three Operation resources:
471 #
472 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
473 #
474 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
475 #
476 # Operations can be global, regional or zonal.
477 # - For global operations, use the `globalOperations` resource.
478 # - For regional operations, use the `regionOperations` resource.
479 # - For zonal operations, use the `zonalOperations` resource.
480 #
481 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
482 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
483 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
484 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
485 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
486 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
487 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700488 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800489 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
490 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
491 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700492 },
493 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800494 },
495 &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`.
496 &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.
497 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
498 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
499 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
500 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800501 &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 -0800502 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
503 &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.
504 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
505 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
506 &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.
507 &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`.
508 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
509 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
510 &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.
511 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
512 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
513 {
514 &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.
515 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
516 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
517 {
518 &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).
519 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
520 },
521 ],
522 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
523 },
524 ],
525 &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.
526}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700527</div>
528
529<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 <code class="details" id="deleteInstances">deleteInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531 <pre>Flags the specified instances in the managed instance group to be immediately deleted. 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. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700532
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400533If 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.
534
535You can specify a maximum of 1000 instances with this method per request.
536
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700537Args:
538 project: string, Project ID for this request. (required)
539 region: string, Name of the region scoping this request. (required)
540 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700541 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700542 The object takes the form of:
543
544{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800545 &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].
546 &quot;A String&quot;,
547 ],
548}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700549
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700550 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.
551
552For 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.
553
554The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700555
556Returns:
557 An object of the form:
558
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800560 #
561 # Google Compute Engine has three Operation resources:
562 #
563 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
564 #
565 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
566 #
567 # Operations can be global, regional or zonal.
568 # - For global operations, use the `globalOperations` resource.
569 # - For regional operations, use the `regionOperations` resource.
570 # - For zonal operations, use the `zonalOperations` resource.
571 #
572 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
573 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
574 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
575 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
576 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
577 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
578 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800580 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
581 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
582 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 },
584 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800585 },
586 &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`.
587 &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.
588 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
589 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
590 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
591 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800592 &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 -0800593 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
594 &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.
595 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
596 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
597 &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.
598 &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`.
599 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
600 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
601 &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.
602 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
603 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
604 {
605 &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.
606 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
607 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
608 {
609 &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).
610 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
611 },
612 ],
613 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
614 },
615 ],
616 &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.
617}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700618</div>
619
620<div class="method">
621 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, region, instanceGroupManager, body=None)</code>
622 <pre>Deletes selected per-instance configs for the managed instance group.
623
624Args:
625 project: string, Project ID for this request. (required)
626 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
627 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
628 body: object, The request body.
629 The object takes the form of:
630
631{ # RegionInstanceGroupManagers.deletePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800632 &quot;names&quot;: [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
633 &quot;A String&quot;,
634 ],
635}
Dan O'Mearadd494642020-05-01 07:42:23 -0700636
637
638Returns:
639 An object of the form:
640
641 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800642 #
643 # Google Compute Engine has three Operation resources:
644 #
645 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
646 #
647 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
648 #
649 # Operations can be global, regional or zonal.
650 # - For global operations, use the `globalOperations` resource.
651 # - For regional operations, use the `regionOperations` resource.
652 # - For zonal operations, use the `zonalOperations` resource.
653 #
654 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
655 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
656 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
657 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
658 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
659 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
660 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800662 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
663 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
664 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700665 },
666 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800667 },
668 &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`.
669 &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.
670 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
671 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
672 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
673 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800674 &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 -0800675 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
676 &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.
677 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
678 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
679 &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.
680 &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`.
681 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
682 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
683 &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.
684 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
685 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
686 {
687 &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.
688 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
689 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
690 {
691 &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).
692 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
693 },
694 ],
695 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
696 },
697 ],
698 &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.
699}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700700</div>
701
702<div class="method">
703 <code class="details" id="get">get(project, region, instanceGroupManager)</code>
704 <pre>Returns all of the details about the specified managed instance group.
705
706Args:
707 project: string, Project ID for this request. (required)
708 region: string, Name of the region scoping this request. (required)
709 instanceGroupManager: string, Name of the managed instance group to return. (required)
710
711Returns:
712 An object of the form:
713
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700714 { # 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 =========================================================================
715 #
716 # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800717 #
718 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
719 #
720 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
721 #
722 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
723 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
724 {
725 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
726 &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 -0700727 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800728 ],
729 &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.
730 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
731 &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.
732 &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.
733 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
Bu Sun Kim65020912020-05-20 12:08:20 -0700734 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800735 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
736 &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.
737 &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.
738 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
739 &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.
740 &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.
741 &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.
742 &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.
743 },
744 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
745 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800746 &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 -0800747 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
748 {
749 &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 Kim65020912020-05-20 12:08:20 -0700750 },
751 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800752 },
753 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
754 &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.
755 #
756 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
757 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
758 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
759 &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.
760 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
761 &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.
762 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
763 { # The named port. For example: .
764 &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.
765 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800767 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800768 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
769 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
770 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
771 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
772 &quot;preservedState&quot;: { # Configuration of preserved resources.
773 &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.
774 &quot;a_key&quot;: {
775 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 },
777 },
778 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800779 },
780 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
781 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
782 &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.
783 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
784 &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.
785 &quot;isStateful&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config.
786 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
787 &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 -0700788 },
789 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800790 &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.
791 &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.
792 },
793 },
794 &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.
795 &quot;A String&quot;,
796 ],
797 &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.
798 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
799 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
800 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
801 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700802 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800803 #
804 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
805 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800807 #
808 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700809 # - 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 -0800810 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
811 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
812 },
813 &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:
814 #
815 #
816 # - The instance&#x27;s status is RUNNING.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700817 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800818 #
819 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
820 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
821 #
822 #
823 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700824 # - 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 -0800825 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
826 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
827 },
828 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
829 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400830 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800831 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
832 &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).
833 },
834 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
835 #
836 # 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.
837 {
838 &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.
839 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
840 &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:
841 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700842 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
844 #
845 #
846 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700847 # - 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 -0700848 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
849 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
850 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800852 ],
853 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
854}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700855</div>
856
857<div class="method">
858 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
859 <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.
860
861A regional managed instance group can contain up to 2000 instances.
862
863Args:
864 project: string, Project ID for this request. (required)
865 region: string, Name of the region scoping this request. (required)
866 body: object, The request body.
867 The object takes the form of:
868
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700869{ # 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 =========================================================================
870 #
871 # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700872 #
873 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
874 #
875 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
876 #
877 # 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 -0700878 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700879 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
881 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Dan O'Mearadd494642020-05-01 07:42:23 -0700882 },
883 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700884 &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.
885 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
886 &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.
887 &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.
888 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
Dan O'Mearadd494642020-05-01 07:42:23 -0700889 #
890 # 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 -0700891 &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.
892 &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.
893 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
894 &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.
895 &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.
896 &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.
897 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 &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 -0700900 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800901 &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 -0700902 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700904 &quot;zone&quot;: &quot;A String&quot;, # The URL of the zone. The zone must exist in the region where the managed instance group is located.
Dan O'Mearadd494642020-05-01 07:42:23 -0700905 },
906 ],
907 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
909 &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.
910 #
911 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
912 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
913 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700914 &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 -0700915 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
916 &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.
917 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
918 { # The named port. For example: .
919 &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.
920 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
921 },
922 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
924 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
925 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
926 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
927 &quot;preservedState&quot;: { # Configuration of preserved resources.
928 &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.
929 &quot;a_key&quot;: {
930 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
Dan O'Mearadd494642020-05-01 07:42:23 -0700931 },
932 },
933 },
934 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
936 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
937 &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.
938 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
939 &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.
940 &quot;isStateful&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700941 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
942 &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.
943 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700944 },
945 &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.
946 &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.
947 },
948 },
949 &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.
950 &quot;A String&quot;,
951 ],
952 &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.
953 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
954 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
955 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
956 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700957 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 #
959 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
960 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
961 #
962 #
963 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700964 # - 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 -0700965 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
966 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
967 },
968 &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:
969 #
970 #
971 # - The instance&#x27;s status is RUNNING.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700972 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 #
974 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
975 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
976 #
977 #
978 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700979 # - 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 -0700980 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
981 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
982 },
983 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
984 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400985 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
987 &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).
988 },
989 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
990 #
991 # 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.
992 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700993 &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 -0700994 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
995 &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:
996 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700997 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700998 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
999 #
1000 #
1001 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001002 # - 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 -07001003 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1004 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1005 },
1006 },
1007 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001008 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07001009}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001010
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001011 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.
1012
1013For 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.
1014
1015The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001016
1017Returns:
1018 An object of the form:
1019
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001020 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001021 #
1022 # Google Compute Engine has three Operation resources:
1023 #
1024 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1025 #
1026 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1027 #
1028 # Operations can be global, regional or zonal.
1029 # - For global operations, use the `globalOperations` resource.
1030 # - For regional operations, use the `regionOperations` resource.
1031 # - For zonal operations, use the `zonalOperations` resource.
1032 #
1033 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1034 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1035 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1036 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1037 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1038 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1039 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001040 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001041 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1042 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1043 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 },
1045 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001046 },
1047 &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`.
1048 &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.
1049 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1050 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1051 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1052 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001053 &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 -08001054 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1055 &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.
1056 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1057 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1058 &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.
1059 &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`.
1060 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1061 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1062 &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.
1063 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1064 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1065 {
1066 &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.
1067 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1068 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1069 {
1070 &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).
1071 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1072 },
1073 ],
1074 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1075 },
1076 ],
1077 &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.
1078}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001079</div>
1080
1081<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001082 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001083 <pre>Retrieves the list of managed instance groups that are contained within the specified region.
1084
1085Args:
1086 project: string, Project ID for this request. (required)
1087 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001089
Dan O'Mearadd494642020-05-01 07:42:23 -07001090For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001091
Dan O'Mearadd494642020-05-01 07:42:23 -07001092You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001093
Bu Sun Kim65020912020-05-20 12:08:20 -07001094To 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) ```
1095 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`)
1096 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1097
1098You 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.
1099
1100Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1101 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 -08001102 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001103
1104Returns:
1105 An object of the form:
1106
1107 { # Contains a list of managed instance groups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001108 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1109 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001110 { # 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 =========================================================================
1111 #
1112 # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001113 #
1114 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1115 #
1116 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1117 #
1118 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1119 &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 -07001120 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001121 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1122 &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 -07001123 },
1124 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001125 &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.
1126 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1127 &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.
1128 &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.
1129 &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.
1130 #
1131 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1132 &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.
1133 &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.
1134 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1135 &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.
1136 &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.
1137 &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.
1138 &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.
1139 },
1140 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1141 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001142 &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 -08001143 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1144 {
1145 &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.
1146 },
1147 ],
1148 },
1149 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1150 &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.
1151 #
1152 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1153 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1154 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1155 &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.
1156 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1157 &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.
1158 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1159 { # The named port. For example: .
1160 &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.
1161 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1162 },
1163 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001164 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1165 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1166 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
1167 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1168 &quot;preservedState&quot;: { # Configuration of preserved resources.
1169 &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.
1170 &quot;a_key&quot;: {
1171 &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.
1172 },
1173 },
1174 },
1175 },
1176 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1177 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1178 &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.
1179 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1180 &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.
1181 &quot;isStateful&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config.
1182 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1183 &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.
1184 },
1185 },
1186 &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.
1187 &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.
1188 },
1189 },
1190 &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.
1191 &quot;A String&quot;,
1192 ],
1193 &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.
1194 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1195 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1196 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1197 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001198 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001199 #
1200 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1201 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1202 #
1203 #
1204 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001205 # - 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 -08001206 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1207 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1208 },
1209 &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:
1210 #
1211 #
1212 # - The instance&#x27;s status is RUNNING.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001213 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001214 #
1215 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1216 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1217 #
1218 #
1219 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001220 # - 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 -08001221 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1222 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1223 },
1224 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1225 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001226 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001227 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1228 &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).
1229 },
1230 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1231 #
1232 # 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.
1233 {
1234 &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.
1235 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1236 &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:
1237 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001238 # - 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001239 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1240 #
1241 #
1242 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001243 # - 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 -08001244 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1245 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1246 },
1247 },
1248 ],
1249 &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 -07001250 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001251 ],
1252 &quot;kind&quot;: &quot;compute#regionInstanceGroupManagerList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups that exist in th regional scope.
1253 &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.
1254 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1255 &quot;warning&quot;: { # [Output Only] Informational warning message.
1256 &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.
1257 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1258 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1259 {
1260 &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).
1261 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1262 },
1263 ],
1264 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1265 },
1266}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001267</div>
1268
1269<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001270 <code class="details" id="listErrors">listErrors(project, region, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001271 <pre>Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001272
1273Args:
1274 project: string, Project ID for this request. (required)
1275 region: string, Name of the region scoping this request. This should conform to RFC1035. (required)
1276 instanceGroupManager: string, The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001277 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;`.
1278
1279For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1280
1281You 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.
1282
Bu Sun Kim65020912020-05-20 12:08:20 -07001283To 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) ```
1284 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`)
1285 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1286
1287You 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.
1288
1289Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1290 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 -08001291 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 -07001292
1293Returns:
1294 An object of the form:
1295
1296 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001297 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
1298 {
1299 &quot;error&quot;: { # [Output Only] Contents of the error.
1300 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1301 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001302 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001303 &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.
1304 &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:
1305 &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.
1306 &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.
1307 &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 }.
1308 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1309 },
1310 },
1311 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1312 },
1313 ],
1314 &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.
1315}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001316</div>
1317
1318<div class="method">
1319 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1320 <pre>Retrieves the next page of results.
1321
1322Args:
1323 previous_request: The request for the previous page. (required)
1324 previous_response: The response from the request for the previous page. (required)
1325
1326Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001327 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001328 page. Returns None if there are no more items in the collection.
1329 </pre>
1330</div>
1331
1332<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001333 <code class="details" id="listManagedInstances">listManagedInstances(project, region, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001334 <pre>Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001335
1336Args:
1337 project: string, Project ID for this request. (required)
1338 region: string, Name of the region scoping this request. (required)
1339 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001340 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001341
Dan O'Mearadd494642020-05-01 07:42:23 -07001342For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001343
Dan O'Mearadd494642020-05-01 07:42:23 -07001344You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001345
Bu Sun Kim65020912020-05-20 12:08:20 -07001346To 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) ```
1347 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`)
1348 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1349
1350You 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.
1351
1352Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1353 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 -08001354 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001355
1356Returns:
1357 An object of the form:
1358
1359 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001360 &quot;managedInstances&quot;: [ # A list of managed instances.
1361 { # A Managed Instance resource.
1362 &quot;currentAction&quot;: &quot;A String&quot;, # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1363 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1364 # - 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.
1365 # - 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.
1366 # - RECREATING The managed instance group is recreating this instance.
1367 # - DELETING The managed instance group is permanently deleting this instance.
1368 # - 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.
1369 # - RESTARTING The managed instance group is restarting the instance.
1370 # - 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.
1371 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
1372 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1373 &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.
1374 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1375 {
1376 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1377 &quot;healthCheck&quot;: &quot;A String&quot;, # [Output Only] The URL for the health check that verifies whether the instance is healthy.
Dan O'Mearadd494642020-05-01 07:42:23 -07001378 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001379 ],
1380 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1381 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1382 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1383 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1384 {
1385 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1386 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1387 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001388 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001389 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001390 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001391 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001392 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1393 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1394 &quot;a_key&quot;: {
1395 &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.
1396 &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.
1397 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1398 },
1399 },
1400 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1401 &quot;a_key&quot;: &quot;A String&quot;,
1402 },
1403 },
1404 &quot;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1405 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1406 &quot;a_key&quot;: {
1407 &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.
1408 &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.
1409 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1410 },
1411 },
1412 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1413 &quot;a_key&quot;: &quot;A String&quot;,
1414 },
1415 },
1416 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1417 &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 }.
1418 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1419 },
1420 },
1421 ],
1422 &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.
1423}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001424</div>
1425
1426<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001427 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1428 <pre>Retrieves the next page of results.
1429
1430Args:
1431 previous_request: The request for the previous page. (required)
1432 previous_response: The response from the request for the previous page. (required)
1433
1434Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001435 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001436 page. Returns None if there are no more items in the collection.
1437 </pre>
1438</div>
1439
1440<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001441 <code class="details" id="listPerInstanceConfigs">listPerInstanceConfigs(project, region, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001442 <pre>Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001443
1444Args:
1445 project: string, Project ID for this request. (required)
1446 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
1447 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001448 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;`.
1449
1450For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1451
1452You 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.
1453
Bu Sun Kim65020912020-05-20 12:08:20 -07001454To 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) ```
1455 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`)
1456 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1457
1458You 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.
1459
1460Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1461 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 -08001462 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 -07001463
1464Returns:
1465 An object of the form:
1466
1467 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001468 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
1469 {
1470 &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.
1471 &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.
1472 &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.
1473 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1474 &quot;a_key&quot;: {
1475 &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.
1476 &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.
1477 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001478 },
1479 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001480 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1481 &quot;a_key&quot;: &quot;A String&quot;,
1482 },
1483 },
1484 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1485 },
1486 ],
1487 &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.
1488 &quot;warning&quot;: { # [Output Only] Informational warning message.
1489 &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.
1490 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1491 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1492 {
1493 &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).
1494 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Dan O'Mearadd494642020-05-01 07:42:23 -07001495 },
1496 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001497 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1498 },
1499}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001500</div>
1501
1502<div class="method">
1503 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1504 <pre>Retrieves the next page of results.
1505
1506Args:
1507 previous_request: The request for the previous page. (required)
1508 previous_response: The response from the request for the previous page. (required)
1509
1510Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001511 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001512 page. Returns None if there are no more items in the collection.
1513 </pre>
1514</div>
1515
1516<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001517 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1518 <pre>Retrieves the next page of results.
1519
1520Args:
1521 previous_request: The request for the previous page. (required)
1522 previous_response: The response from the request for the previous page. (required)
1523
1524Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001525 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001526 page. Returns None if there are no more items in the collection.
1527 </pre>
1528</div>
1529
1530<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001531 <code class="details" id="patch">patch(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001532 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001533
1534Args:
1535 project: string, Project ID for this request. (required)
1536 region: string, Name of the region scoping this request. (required)
1537 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001539 The object takes the form of:
1540
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001541{ # 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 =========================================================================
1542 #
1543 # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001544 #
1545 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1546 #
1547 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1548 #
1549 # 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 -07001550 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -07001551 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001552 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1553 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Dan O'Mearadd494642020-05-01 07:42:23 -07001554 },
1555 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001556 &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.
1557 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1558 &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.
1559 &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.
1560 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
Dan O'Mearadd494642020-05-01 07:42:23 -07001561 #
1562 # 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 -07001563 &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.
1564 &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.
1565 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1566 &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.
1567 &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.
1568 &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.
1569 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001570 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001571 &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 -07001572 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001573 &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 -07001574 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001576 &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 -07001577 },
1578 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001579 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001580 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1581 &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.
1582 #
1583 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1584 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1585 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001586 &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 -07001587 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1588 &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.
1589 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1590 { # The named port. For example: .
1591 &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.
1592 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1593 },
1594 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001595 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1596 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1597 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
1598 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1599 &quot;preservedState&quot;: { # Configuration of preserved resources.
1600 &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.
1601 &quot;a_key&quot;: {
1602 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001603 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001604 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001605 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001606 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001607 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1608 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1609 &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.
1610 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1611 &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.
1612 &quot;isStateful&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001613 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1614 &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.
1615 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001616 },
1617 &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.
1618 &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.
1619 },
1620 },
1621 &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.
1622 &quot;A String&quot;,
1623 ],
1624 &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.
1625 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1626 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1627 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1628 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001629 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001630 #
1631 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1632 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1633 #
1634 #
1635 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001636 # - 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 -07001637 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1638 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1639 },
1640 &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:
1641 #
1642 #
1643 # - The instance&#x27;s status is RUNNING.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001644 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001645 #
1646 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1647 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1648 #
1649 #
1650 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001651 # - 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 -07001652 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1653 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1654 },
1655 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1656 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001657 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Bu Sun Kim65020912020-05-20 12:08:20 -07001658 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1659 &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).
1660 },
1661 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1662 #
1663 # 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.
1664 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001665 &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 -07001666 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1667 &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:
1668 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001669 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001670 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1671 #
1672 #
1673 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001674 # - 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 -07001675 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1676 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1677 },
1678 },
1679 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001680 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07001681}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001682
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001683 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.
1684
1685For 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.
1686
1687The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001688
1689Returns:
1690 An object of the form:
1691
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001692 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001693 #
1694 # Google Compute Engine has three Operation resources:
1695 #
1696 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1697 #
1698 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1699 #
1700 # Operations can be global, regional or zonal.
1701 # - For global operations, use the `globalOperations` resource.
1702 # - For regional operations, use the `regionOperations` resource.
1703 # - For zonal operations, use the `zonalOperations` resource.
1704 #
1705 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1706 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1707 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1708 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1709 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1710 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1711 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001712 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001713 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1714 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1715 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001716 },
1717 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001718 },
1719 &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`.
1720 &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.
1721 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1722 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1723 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1724 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001725 &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 -08001726 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1727 &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.
1728 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1729 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1730 &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.
1731 &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`.
1732 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1733 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1734 &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.
1735 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1736 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1737 {
1738 &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.
1739 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1740 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1741 {
1742 &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).
1743 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1744 },
1745 ],
1746 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1747 },
1748 ],
1749 &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.
1750}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001751</div>
1752
1753<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001754 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001755 <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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001756
1757Args:
1758 project: string, Project ID for this request. (required)
1759 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
1760 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1761 body: object, The request body.
1762 The object takes the form of:
1763
1764{ # RegionInstanceGroupManagers.patchPerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001765 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
1766 {
1767 &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.
1768 &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.
1769 &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.
1770 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1771 &quot;a_key&quot;: {
1772 &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.
1773 &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.
1774 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001775 },
1776 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001777 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1778 &quot;a_key&quot;: &quot;A String&quot;,
1779 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001780 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001781 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1782 },
1783 ],
1784}
Dan O'Mearadd494642020-05-01 07:42:23 -07001785
1786 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.
1787
1788For 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.
1789
1790The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1791
1792Returns:
1793 An object of the form:
1794
1795 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001796 #
1797 # Google Compute Engine has three Operation resources:
1798 #
1799 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1800 #
1801 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1802 #
1803 # Operations can be global, regional or zonal.
1804 # - For global operations, use the `globalOperations` resource.
1805 # - For regional operations, use the `regionOperations` resource.
1806 # - For zonal operations, use the `zonalOperations` resource.
1807 #
1808 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1809 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1810 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1811 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1812 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1813 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1814 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001815 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001816 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1817 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1818 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001819 },
1820 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001821 },
1822 &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`.
1823 &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.
1824 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1825 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1826 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1827 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001828 &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 -08001829 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1830 &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.
1831 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1832 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1833 &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.
1834 &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`.
1835 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1836 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1837 &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.
1838 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1839 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1840 {
1841 &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.
1842 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1843 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1844 {
1845 &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).
1846 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1847 },
1848 ],
1849 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1850 },
1851 ],
1852 &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.
1853}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001854</div>
1855
1856<div class="method">
1857 <code class="details" id="recreateInstances">recreateInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001858 <pre>Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group&#x27;s current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001859
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001860If 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.
1861
1862You can specify a maximum of 1000 instances with this method per request.
1863
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001864Args:
1865 project: string, Project ID for this request. (required)
1866 region: string, Name of the region scoping this request. (required)
1867 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001868 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001869 The object takes the form of:
1870
1871{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001872 &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].
1873 &quot;A String&quot;,
1874 ],
1875}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001876
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001877 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.
1878
1879For 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.
1880
1881The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001882
1883Returns:
1884 An object of the form:
1885
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001886 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001887 #
1888 # Google Compute Engine has three Operation resources:
1889 #
1890 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1891 #
1892 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1893 #
1894 # Operations can be global, regional or zonal.
1895 # - For global operations, use the `globalOperations` resource.
1896 # - For regional operations, use the `regionOperations` resource.
1897 # - For zonal operations, use the `zonalOperations` resource.
1898 #
1899 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1900 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1901 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1902 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1903 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1904 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1905 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001906 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001907 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1908 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1909 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001910 },
1911 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001912 },
1913 &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`.
1914 &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.
1915 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1916 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1917 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1918 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001919 &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 -08001920 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1921 &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.
1922 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1923 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1924 &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.
1925 &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`.
1926 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1927 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1928 &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.
1929 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1930 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1931 {
1932 &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.
1933 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1934 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1935 {
1936 &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).
1937 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1938 },
1939 ],
1940 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1941 },
1942 ],
1943 &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.
1944}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001945</div>
1946
1947<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001948 <code class="details" id="resize">resize(project, region, instanceGroupManager, size, requestId=None)</code>
1949 <pre>Changes the intended size of 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 one or more instances.
1950
1951The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001952
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001953If 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.
1954
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001955Args:
1956 project: string, Project ID for this request. (required)
1957 region: string, Name of the region scoping this request. (required)
1958 instanceGroupManager: string, Name of the managed instance group. (required)
1959 size: integer, Number of instances that should exist in this instance group manager. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001960 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.
1961
1962For 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.
1963
1964The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001965
1966Returns:
1967 An object of the form:
1968
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001969 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001970 #
1971 # Google Compute Engine has three Operation resources:
1972 #
1973 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1974 #
1975 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1976 #
1977 # Operations can be global, regional or zonal.
1978 # - For global operations, use the `globalOperations` resource.
1979 # - For regional operations, use the `regionOperations` resource.
1980 # - For zonal operations, use the `zonalOperations` resource.
1981 #
1982 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1983 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1984 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1985 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1986 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1987 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1988 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001989 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001990 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1991 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1992 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001993 },
1994 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001995 },
1996 &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`.
1997 &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.
1998 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1999 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2000 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2001 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002002 &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 -08002003 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2004 &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.
2005 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2006 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2007 &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.
2008 &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`.
2009 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2010 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2011 &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.
2012 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2013 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2014 {
2015 &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.
2016 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2017 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2018 {
2019 &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).
2020 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2021 },
2022 ],
2023 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2024 },
2025 ],
2026 &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.
2027}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002028</div>
2029
2030<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002031 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002032 <pre>Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002033
2034Args:
2035 project: string, Project ID for this request. (required)
2036 region: string, Name of the region scoping this request. (required)
2037 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002038 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002039 The object takes the form of:
2040
2041{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002042 &quot;autoHealingPolicies&quot;: [
2043 {
2044 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2045 &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].
2046 },
2047 ],
2048}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002049
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002050 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.
2051
2052For 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.
2053
2054The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002055
2056Returns:
2057 An object of the form:
2058
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002059 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002060 #
2061 # Google Compute Engine has three Operation resources:
2062 #
2063 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2064 #
2065 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2066 #
2067 # Operations can be global, regional or zonal.
2068 # - For global operations, use the `globalOperations` resource.
2069 # - For regional operations, use the `regionOperations` resource.
2070 # - For zonal operations, use the `zonalOperations` resource.
2071 #
2072 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2073 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2074 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2075 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2076 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2077 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2078 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002079 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002080 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2081 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2082 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002083 },
2084 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002085 },
2086 &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`.
2087 &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.
2088 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2089 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2090 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2091 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002092 &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 -08002093 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2094 &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.
2095 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2096 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2097 &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.
2098 &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`.
2099 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2100 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2101 &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.
2102 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2103 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2104 {
2105 &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.
2106 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2107 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2108 {
2109 &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).
2110 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2111 },
2112 ],
2113 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2114 },
2115 ],
2116 &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.
2117}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002118</div>
2119
2120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002121 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002122 <pre>Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
2123
2124Args:
2125 project: string, Project ID for this request. (required)
2126 region: string, Name of the region scoping this request. (required)
2127 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002128 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002129 The object takes the form of:
2130
2131{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002132 &quot;instanceTemplate&quot;: &quot;A String&quot;, # URL of the InstanceTemplate resource from which all new instances will be created.
2133}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002134
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002135 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.
2136
2137For 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.
2138
2139The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002140
2141Returns:
2142 An object of the form:
2143
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002144 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002145 #
2146 # Google Compute Engine has three Operation resources:
2147 #
2148 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2149 #
2150 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2151 #
2152 # Operations can be global, regional or zonal.
2153 # - For global operations, use the `globalOperations` resource.
2154 # - For regional operations, use the `regionOperations` resource.
2155 # - For zonal operations, use the `zonalOperations` resource.
2156 #
2157 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2158 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2159 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2160 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2161 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2162 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2163 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002164 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002165 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2166 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2167 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002168 },
2169 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002170 },
2171 &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`.
2172 &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.
2173 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2174 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2175 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2176 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002177 &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 -08002178 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2179 &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.
2180 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2181 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2182 &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.
2183 &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`.
2184 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2185 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2186 &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.
2187 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2188 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2189 {
2190 &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.
2191 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2192 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2193 {
2194 &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).
2195 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2196 },
2197 ],
2198 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2199 },
2200 ],
2201 &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.
2202}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002203</div>
2204
2205<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002206 <code class="details" id="setTargetPools">setTargetPools(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002207 <pre>Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
2208
2209Args:
2210 project: string, Project ID for this request. (required)
2211 region: string, Name of the region scoping this request. (required)
2212 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002213 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002214 The object takes the form of:
2215
2216{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002217 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of the target pools information, which is a hash of the contents. This field is used for optimistic locking when you update the target pool entries. This field is optional.
2218 &quot;targetPools&quot;: [ # The URL of 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.
2219 &quot;A String&quot;,
2220 ],
2221}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002222
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002223 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.
2224
2225For 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.
2226
2227The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002228
2229Returns:
2230 An object of the form:
2231
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002232 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002233 #
2234 # Google Compute Engine has three Operation resources:
2235 #
2236 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2237 #
2238 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2239 #
2240 # Operations can be global, regional or zonal.
2241 # - For global operations, use the `globalOperations` resource.
2242 # - For regional operations, use the `regionOperations` resource.
2243 # - For zonal operations, use the `zonalOperations` resource.
2244 #
2245 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2246 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2247 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2248 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2249 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2250 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2251 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002252 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002253 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2254 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2255 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002256 },
2257 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002258 },
2259 &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`.
2260 &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.
2261 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2262 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2263 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2264 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002265 &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 -08002266 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2267 &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.
2268 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2269 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2270 &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.
2271 &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`.
2272 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2273 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2274 &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.
2275 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2276 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2277 {
2278 &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.
2279 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2280 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2281 {
2282 &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).
2283 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2284 },
2285 ],
2286 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2287 },
2288 ],
2289 &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.
2290}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002291</div>
2292
2293<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002294 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002295 <pre>Returns permissions that a caller has on the specified resource.
2296
2297Args:
2298 project: string, Project ID for this request. (required)
2299 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002300 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002301 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002302 The object takes the form of:
2303
2304{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002305 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
2306 &quot;A String&quot;,
2307 ],
2308}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002309
2310
2311Returns:
2312 An object of the form:
2313
2314 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002315 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2316 &quot;A String&quot;,
2317 ],
2318}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002319</div>
2320
2321<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002322 <code class="details" id="update">update(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002323 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.
2324
2325Args:
2326 project: string, Project ID for this request. (required)
2327 region: string, Name of the region scoping this request. (required)
2328 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002329 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002330 The object takes the form of:
2331
yoshi-code-botc2cd3262021-05-16 02:16:04 -07002332{ # 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 =========================================================================
2333 #
2334 # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002335 #
2336 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2337 #
2338 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2339 #
2340 # 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 -07002341 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -07002342 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002343 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2344 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Dan O'Mearadd494642020-05-01 07:42:23 -07002345 },
2346 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002347 &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.
2348 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2349 &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.
2350 &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.
2351 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
Dan O'Mearadd494642020-05-01 07:42:23 -07002352 #
2353 # 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 -07002354 &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.
2355 &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.
2356 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2357 &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.
2358 &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.
2359 &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.
2360 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002361 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002362 &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 -07002363 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002364 &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 -07002365 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002366 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002367 &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 -07002368 },
2369 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002370 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002371 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
2372 &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.
2373 #
2374 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2375 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2376 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002377 &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 -07002378 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2379 &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.
2380 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2381 { # The named port. For example: .
2382 &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.
2383 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
2384 },
2385 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002386 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2387 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
2388 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
2389 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
2390 &quot;preservedState&quot;: { # Configuration of preserved resources.
2391 &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.
2392 &quot;a_key&quot;: {
2393 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002394 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002395 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002396 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002397 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002398 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
2399 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
2400 &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.
2401 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
2402 &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.
2403 &quot;isStateful&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002404 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
2405 &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.
2406 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002407 },
2408 &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.
2409 &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.
2410 },
2411 },
2412 &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.
2413 &quot;A String&quot;,
2414 ],
2415 &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.
2416 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
2417 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
2418 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
2419 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07002420 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002421 #
2422 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2423 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2424 #
2425 #
2426 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07002427 # - 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 -07002428 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2429 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2430 },
2431 &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:
2432 #
2433 #
2434 # - The instance&#x27;s status is RUNNING.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07002435 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002436 #
2437 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2438 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2439 #
2440 #
2441 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07002442 # - 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 -07002443 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2444 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2445 },
2446 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
2447 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04002448 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
Bu Sun Kim65020912020-05-20 12:08:20 -07002449 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
2450 &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).
2451 },
2452 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
2453 #
2454 # 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.
2455 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002456 &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 -07002457 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
2458 &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:
2459 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07002460 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002461 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2462 #
2463 #
2464 # - If the value is fixed, then the calculated value is equal to the fixed value.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07002465 # - 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 -07002466 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2467 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2468 },
2469 },
2470 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002471 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07002472}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002473
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002474 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.
2475
2476For 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.
2477
2478The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002479
2480Returns:
2481 An object of the form:
2482
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002483 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002484 #
2485 # Google Compute Engine has three Operation resources:
2486 #
2487 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2488 #
2489 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2490 #
2491 # Operations can be global, regional or zonal.
2492 # - For global operations, use the `globalOperations` resource.
2493 # - For regional operations, use the `regionOperations` resource.
2494 # - For zonal operations, use the `zonalOperations` resource.
2495 #
2496 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2497 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2498 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2499 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2500 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2501 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2502 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002503 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002504 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2505 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2506 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002507 },
2508 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002509 },
2510 &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`.
2511 &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.
2512 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2513 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2514 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2515 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002516 &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 -08002517 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2518 &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.
2519 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2520 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2521 &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.
2522 &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`.
2523 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2524 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2525 &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.
2526 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2527 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2528 {
2529 &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.
2530 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2531 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2532 {
2533 &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).
2534 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2535 },
2536 ],
2537 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2538 },
2539 ],
2540 &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.
2541}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07002542</div>
2543
2544<div class="method">
2545 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002546 <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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002547
2548Args:
2549 project: string, Project ID for this request. (required)
2550 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
2551 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2552 body: object, The request body.
2553 The object takes the form of:
2554
2555{ # RegionInstanceGroupManagers.updatePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002556 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
2557 {
2558 &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.
2559 &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.
2560 &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.
2561 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2562 &quot;a_key&quot;: {
2563 &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.
2564 &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.
2565 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002566 },
2567 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002568 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2569 &quot;a_key&quot;: &quot;A String&quot;,
2570 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002571 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002572 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
2573 },
2574 ],
2575}
Dan O'Mearadd494642020-05-01 07:42:23 -07002576
2577 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.
2578
2579For 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.
2580
2581The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2582
2583Returns:
2584 An object of the form:
2585
2586 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002587 #
2588 # Google Compute Engine has three Operation resources:
2589 #
2590 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2591 #
2592 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2593 #
2594 # Operations can be global, regional or zonal.
2595 # - For global operations, use the `globalOperations` resource.
2596 # - For regional operations, use the `regionOperations` resource.
2597 # - For zonal operations, use the `zonalOperations` resource.
2598 #
2599 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2600 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2601 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2602 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2603 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2604 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2605 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002606 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002607 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2608 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2609 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002610 },
2611 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002612 },
2613 &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`.
2614 &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.
2615 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2616 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2617 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2618 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002619 &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 -08002620 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2621 &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.
2622 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2623 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2624 &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.
2625 &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`.
2626 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2627 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2628 &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.
2629 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2630 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2631 {
2632 &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.
2633 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2634 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2635 {
2636 &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).
2637 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2638 },
2639 ],
2640 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2641 },
2642 ],
2643 &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.
2644}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002645</div>
2646
2647</body></html>