blob: 0a398af48e9b251e360bcfe1c42376cbc4f4e20a [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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136<p class="firstline">Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 { # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800715 #
716 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
717 #
718 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
719 #
720 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
721 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
722 {
723 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
724 &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 -0700725 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800726 ],
727 &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.
728 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
729 &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.
730 &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.
731 &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 -0700732 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800733 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
734 &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.
735 &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.
736 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
737 &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.
738 &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.
739 &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.
740 &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.
741 },
742 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
743 &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 -0800744 &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 -0800745 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
746 {
747 &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 -0700748 },
749 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800750 },
751 &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.
752 &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.
753 #
754 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
755 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
756 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
757 &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.
758 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
759 &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.
760 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
761 { # The named port. For example: .
762 &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.
763 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800765 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800766 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
767 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
768 &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.
769 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
770 &quot;preservedState&quot;: { # Configuration of preserved resources.
771 &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.
772 &quot;a_key&quot;: {
773 &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 -0700774 },
775 },
776 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800777 },
778 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
779 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
780 &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.
781 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
782 &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.
783 &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.
784 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
785 &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 -0700786 },
787 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800788 &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.
789 &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.
790 },
791 },
792 &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.
793 &quot;A String&quot;,
794 ],
795 &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.
796 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
797 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
798 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
799 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800800 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800801 #
802 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
803 &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 -0700804 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800805 #
806 # - If the value is fixed, then the calculated value is equal to the fixed value.
807 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
808 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
809 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
810 },
811 &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:
812 #
813 #
814 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800815 # - If there is a health check on the instance group, the instance&#x27;s health check status must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800816 #
817 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
818 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
819 #
820 #
821 # - If the value is fixed, then the calculated value is equal to the fixed value.
822 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
823 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
824 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
825 },
826 &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].
827 &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.
828 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
829 &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).
830 },
831 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
832 #
833 # 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.
834 {
835 &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.
836 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
837 &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:
838 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
839 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
841 #
842 #
843 # - If the value is fixed, then the calculated value is equal to the fixed value.
844 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
845 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
846 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
847 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800849 ],
850 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
851}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700852</div>
853
854<div class="method">
855 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
856 <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.
857
858A regional managed instance group can contain up to 2000 instances.
859
860Args:
861 project: string, Project ID for this request. (required)
862 region: string, Name of the region scoping this request. (required)
863 body: object, The request body.
864 The object takes the form of:
865
866{ # Represents a Managed Instance Group resource.
867 #
868 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
869 #
870 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
871 #
872 # 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 -0700873 &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 -0700874 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
876 &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 -0700877 },
878 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 &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.
880 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
881 &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.
882 &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.
883 &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 -0700884 #
885 # 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 -0700886 &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.
887 &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.
888 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
889 &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.
890 &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.
891 &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.
892 &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 -0700893 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &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 -0700895 &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 -0800896 &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 -0700897 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 &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 -0700900 },
901 ],
902 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &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.
904 &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.
905 #
906 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
907 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
908 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700909 &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 -0700910 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
911 &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.
912 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
913 { # The named port. For example: .
914 &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.
915 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
916 },
917 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
919 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
920 &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.
921 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
922 &quot;preservedState&quot;: { # Configuration of preserved resources.
923 &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.
924 &quot;a_key&quot;: {
925 &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 -0700926 },
927 },
928 },
929 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
931 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
932 &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.
933 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
934 &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.
935 &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 -0700936 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
937 &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.
938 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 },
940 &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.
941 &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.
942 },
943 },
944 &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.
945 &quot;A String&quot;,
946 ],
947 &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.
948 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
949 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
950 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
951 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800952 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 #
954 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
955 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
956 #
957 #
958 # - If the value is fixed, then the calculated value is equal to the fixed value.
959 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
960 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
961 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
962 },
963 &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:
964 #
965 #
966 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800967 # - If there is a health check on the instance group, the instance&#x27;s health check status must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 #
969 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
970 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
971 #
972 #
973 # - If the value is fixed, then the calculated value is equal to the fixed value.
974 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
975 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
976 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
977 },
978 &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].
979 &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.
980 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
981 &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).
982 },
983 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
984 #
985 # 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.
986 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700987 &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 -0700988 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
989 &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:
990 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
991 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
992 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
993 #
994 #
995 # - If the value is fixed, then the calculated value is equal to the fixed value.
996 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
997 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
998 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
999 },
1000 },
1001 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001002 &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 -07001003}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001004
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001005 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.
1006
1007For 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.
1008
1009The 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 -07001010
1011Returns:
1012 An object of the form:
1013
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001014 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001015 #
1016 # Google Compute Engine has three Operation resources:
1017 #
1018 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1019 #
1020 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1021 #
1022 # Operations can be global, regional or zonal.
1023 # - For global operations, use the `globalOperations` resource.
1024 # - For regional operations, use the `regionOperations` resource.
1025 # - For zonal operations, use the `zonalOperations` resource.
1026 #
1027 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1028 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1029 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1030 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1031 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1032 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1033 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001035 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1036 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1037 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 },
1039 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001040 },
1041 &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`.
1042 &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.
1043 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1044 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1045 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1046 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001047 &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 -08001048 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1049 &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.
1050 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1051 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1052 &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.
1053 &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`.
1054 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1055 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1056 &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.
1057 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1058 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1059 {
1060 &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.
1061 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1062 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1063 {
1064 &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).
1065 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1066 },
1067 ],
1068 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1069 },
1070 ],
1071 &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.
1072}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001073</div>
1074
1075<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001076 <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 -07001077 <pre>Retrieves the list of managed instance groups that are contained within the specified region.
1078
1079Args:
1080 project: string, Project ID for this request. (required)
1081 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001082 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 -07001083
Dan O'Mearadd494642020-05-01 07:42:23 -07001084For 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 -07001085
Dan O'Mearadd494642020-05-01 07:42:23 -07001086You 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 -07001087
Bu Sun Kim65020912020-05-20 12:08:20 -07001088To 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) ```
1089 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`)
1090 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1091
1092You 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.
1093
1094Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1095 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 -08001096 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 -07001097
1098Returns:
1099 An object of the form:
1100
1101 { # Contains a list of managed instance groups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001102 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1103 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
1104 { # Represents a Managed Instance Group resource.
1105 #
1106 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1107 #
1108 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1109 #
1110 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1111 &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 -07001112 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001113 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1114 &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 -07001115 },
1116 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001117 &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.
1118 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1119 &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.
1120 &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.
1121 &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.
1122 #
1123 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1124 &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.
1125 &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.
1126 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1127 &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.
1128 &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.
1129 &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.
1130 &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.
1131 },
1132 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1133 &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 -08001134 &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 -08001135 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1136 {
1137 &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.
1138 },
1139 ],
1140 },
1141 &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.
1142 &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.
1143 #
1144 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1145 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1146 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1147 &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.
1148 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1149 &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.
1150 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1151 { # The named port. For example: .
1152 &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.
1153 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1154 },
1155 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001156 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1157 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1158 &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.
1159 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1160 &quot;preservedState&quot;: { # Configuration of preserved resources.
1161 &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.
1162 &quot;a_key&quot;: {
1163 &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.
1164 },
1165 },
1166 },
1167 },
1168 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1169 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1170 &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.
1171 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1172 &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.
1173 &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.
1174 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1175 &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.
1176 },
1177 },
1178 &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.
1179 &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.
1180 },
1181 },
1182 &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.
1183 &quot;A String&quot;,
1184 ],
1185 &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.
1186 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1187 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1188 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1189 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001190 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001191 #
1192 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1193 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1194 #
1195 #
1196 # - If the value is fixed, then the calculated value is equal to the fixed value.
1197 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1198 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1199 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1200 },
1201 &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:
1202 #
1203 #
1204 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001205 # - If there is a health check on the instance group, the instance&#x27;s health check status must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001206 #
1207 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1208 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1209 #
1210 #
1211 # - If the value is fixed, then the calculated value is equal to the fixed value.
1212 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1213 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1214 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1215 },
1216 &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].
1217 &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.
1218 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1219 &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).
1220 },
1221 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1222 #
1223 # 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.
1224 {
1225 &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.
1226 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1227 &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:
1228 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1229 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1230 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1231 #
1232 #
1233 # - If the value is fixed, then the calculated value is equal to the fixed value.
1234 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1235 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1236 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1237 },
1238 },
1239 ],
1240 &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 -07001241 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001242 ],
1243 &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.
1244 &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.
1245 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1246 &quot;warning&quot;: { # [Output Only] Informational warning message.
1247 &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.
1248 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1249 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1250 {
1251 &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).
1252 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1253 },
1254 ],
1255 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1256 },
1257}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001258</div>
1259
1260<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001261 <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 -07001262 <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 -07001263
1264Args:
1265 project: string, Project ID for this request. (required)
1266 region: string, Name of the region scoping this request. This should conform to RFC1035. (required)
1267 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 -07001268 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;`.
1269
1270For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1271
1272You 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.
1273
Bu Sun Kim65020912020-05-20 12:08:20 -07001274To 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) ```
1275 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`)
1276 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1277
1278You 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.
1279
1280Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1281 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 -08001282 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 -07001283
1284Returns:
1285 An object of the form:
1286
1287 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001288 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
1289 {
1290 &quot;error&quot;: { # [Output Only] Contents of the error.
1291 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1292 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001293 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001294 &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.
1295 &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:
1296 &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.
1297 &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.
1298 &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 }.
1299 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1300 },
1301 },
1302 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1303 },
1304 ],
1305 &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.
1306}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001307</div>
1308
1309<div class="method">
1310 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1311 <pre>Retrieves the next page of results.
1312
1313Args:
1314 previous_request: The request for the previous page. (required)
1315 previous_response: The response from the request for the previous page. (required)
1316
1317Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001318 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001319 page. Returns None if there are no more items in the collection.
1320 </pre>
1321</div>
1322
1323<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001324 <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 -07001325 <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 -07001326
1327Args:
1328 project: string, Project ID for this request. (required)
1329 region: string, Name of the region scoping this request. (required)
1330 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001331 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 -07001332
Dan O'Mearadd494642020-05-01 07:42:23 -07001333For 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 -07001334
Dan O'Mearadd494642020-05-01 07:42:23 -07001335You 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 -07001336
Bu Sun Kim65020912020-05-20 12:08:20 -07001337To 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) ```
1338 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`)
1339 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1340
1341You 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.
1342
1343Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1344 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 -08001345 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 -07001346
1347Returns:
1348 An object of the form:
1349
1350 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001351 &quot;managedInstances&quot;: [ # A list of managed instances.
1352 { # A Managed Instance resource.
1353 &quot;currentAction&quot;: &quot;A String&quot;, # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1354 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1355 # - 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.
1356 # - 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.
1357 # - RECREATING The managed instance group is recreating this instance.
1358 # - DELETING The managed instance group is permanently deleting this instance.
1359 # - 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.
1360 # - RESTARTING The managed instance group is restarting the instance.
1361 # - 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.
1362 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
1363 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1364 &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.
1365 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1366 {
1367 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1368 &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 -07001369 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001370 ],
1371 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1372 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1373 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1374 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1375 {
1376 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1377 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1378 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001379 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001380 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001381 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001382 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001383 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1384 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1385 &quot;a_key&quot;: {
1386 &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.
1387 &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.
1388 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1389 },
1390 },
1391 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1392 &quot;a_key&quot;: &quot;A String&quot;,
1393 },
1394 },
1395 &quot;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1396 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1397 &quot;a_key&quot;: {
1398 &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.
1399 &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.
1400 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1401 },
1402 },
1403 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1404 &quot;a_key&quot;: &quot;A String&quot;,
1405 },
1406 },
1407 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1408 &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 }.
1409 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1410 },
1411 },
1412 ],
1413 &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.
1414}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001415</div>
1416
1417<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001418 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1419 <pre>Retrieves the next page of results.
1420
1421Args:
1422 previous_request: The request for the previous page. (required)
1423 previous_response: The response from the request for the previous page. (required)
1424
1425Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001426 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001427 page. Returns None if there are no more items in the collection.
1428 </pre>
1429</div>
1430
1431<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001432 <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 -07001433 <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 -07001434
1435Args:
1436 project: string, Project ID for this request. (required)
1437 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
1438 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001439 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;`.
1440
1441For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1442
1443You 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.
1444
Bu Sun Kim65020912020-05-20 12:08:20 -07001445To 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) ```
1446 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`)
1447 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1448
1449You 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.
1450
1451Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1452 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 -08001453 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 -07001454
1455Returns:
1456 An object of the form:
1457
1458 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001459 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
1460 {
1461 &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.
1462 &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.
1463 &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.
1464 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1465 &quot;a_key&quot;: {
1466 &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.
1467 &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.
1468 &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 -07001469 },
1470 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001471 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1472 &quot;a_key&quot;: &quot;A String&quot;,
1473 },
1474 },
1475 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1476 },
1477 ],
1478 &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.
1479 &quot;warning&quot;: { # [Output Only] Informational warning message.
1480 &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.
1481 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1482 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1483 {
1484 &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).
1485 &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 -07001486 },
1487 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001488 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1489 },
1490}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001491</div>
1492
1493<div class="method">
1494 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1495 <pre>Retrieves the next page of results.
1496
1497Args:
1498 previous_request: The request for the previous page. (required)
1499 previous_response: The response from the request for the previous page. (required)
1500
1501Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001503 page. Returns None if there are no more items in the collection.
1504 </pre>
1505</div>
1506
1507<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001508 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1509 <pre>Retrieves the next page of results.
1510
1511Args:
1512 previous_request: The request for the previous page. (required)
1513 previous_response: The response from the request for the previous page. (required)
1514
1515Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001516 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001517 page. Returns None if there are no more items in the collection.
1518 </pre>
1519</div>
1520
1521<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001522 <code class="details" id="patch">patch(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001523 <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 -07001524
1525Args:
1526 project: string, Project ID for this request. (required)
1527 region: string, Name of the region scoping this request. (required)
1528 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001529 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001530 The object takes the form of:
1531
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001532{ # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001533 #
1534 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1535 #
1536 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1537 #
1538 # 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 -07001539 &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 -07001540 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001541 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1542 &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 -07001543 },
1544 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001545 &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.
1546 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1547 &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.
1548 &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.
1549 &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 -07001550 #
1551 # 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 -07001552 &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.
1553 &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.
1554 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1555 &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.
1556 &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.
1557 &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.
1558 &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 -07001559 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001560 &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 -07001561 &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 -08001562 &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 -07001563 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001564 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001565 &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 -07001566 },
1567 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001568 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001569 &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.
1570 &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.
1571 #
1572 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1573 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1574 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001575 &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 -07001576 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1577 &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.
1578 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1579 { # The named port. For example: .
1580 &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.
1581 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1582 },
1583 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001584 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1585 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1586 &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.
1587 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1588 &quot;preservedState&quot;: { # Configuration of preserved resources.
1589 &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.
1590 &quot;a_key&quot;: {
1591 &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 -07001592 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001593 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001594 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001595 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001596 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1597 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1598 &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.
1599 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1600 &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.
1601 &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 -07001602 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1603 &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.
1604 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001605 },
1606 &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.
1607 &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.
1608 },
1609 },
1610 &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.
1611 &quot;A String&quot;,
1612 ],
1613 &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.
1614 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1615 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1616 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1617 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001618 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07001619 #
1620 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1621 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1622 #
1623 #
1624 # - If the value is fixed, then the calculated value is equal to the fixed value.
1625 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1626 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1627 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1628 },
1629 &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:
1630 #
1631 #
1632 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001633 # - If there is a health check on the instance group, the instance&#x27;s health check status must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 #
1635 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1636 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1637 #
1638 #
1639 # - If the value is fixed, then the calculated value is equal to the fixed value.
1640 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1641 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1642 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1643 },
1644 &quot;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].
1645 &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.
1646 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1647 &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).
1648 },
1649 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1650 #
1651 # 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.
1652 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001653 &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 -07001654 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1655 &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:
1656 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1657 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1658 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1659 #
1660 #
1661 # - If the value is fixed, then the calculated value is equal to the fixed value.
1662 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1663 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1664 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1665 },
1666 },
1667 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001668 &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 -07001669}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001670
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001671 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.
1672
1673For 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.
1674
1675The 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 -07001676
1677Returns:
1678 An object of the form:
1679
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001680 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001681 #
1682 # Google Compute Engine has three Operation resources:
1683 #
1684 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1685 #
1686 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1687 #
1688 # Operations can be global, regional or zonal.
1689 # - For global operations, use the `globalOperations` resource.
1690 # - For regional operations, use the `regionOperations` resource.
1691 # - For zonal operations, use the `zonalOperations` resource.
1692 #
1693 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1694 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1695 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1696 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1697 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1698 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1699 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001700 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001701 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1702 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1703 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 },
1705 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001706 },
1707 &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`.
1708 &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.
1709 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1710 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1711 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1712 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001713 &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 -08001714 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1715 &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.
1716 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1717 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1718 &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.
1719 &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`.
1720 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1721 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1722 &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.
1723 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1724 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1725 {
1726 &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.
1727 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1728 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1729 {
1730 &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).
1731 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1732 },
1733 ],
1734 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1735 },
1736 ],
1737 &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.
1738}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001739</div>
1740
1741<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001742 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001743 <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 -07001744
1745Args:
1746 project: string, Project ID for this request. (required)
1747 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
1748 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1749 body: object, The request body.
1750 The object takes the form of:
1751
1752{ # RegionInstanceGroupManagers.patchPerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001753 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
1754 {
1755 &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.
1756 &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.
1757 &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.
1758 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1759 &quot;a_key&quot;: {
1760 &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.
1761 &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.
1762 &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 -07001763 },
1764 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001765 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1766 &quot;a_key&quot;: &quot;A String&quot;,
1767 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001768 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001769 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1770 },
1771 ],
1772}
Dan O'Mearadd494642020-05-01 07:42:23 -07001773
1774 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.
1775
1776For 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.
1777
1778The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1779
1780Returns:
1781 An object of the form:
1782
1783 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001784 #
1785 # Google Compute Engine has three Operation resources:
1786 #
1787 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1788 #
1789 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1790 #
1791 # Operations can be global, regional or zonal.
1792 # - For global operations, use the `globalOperations` resource.
1793 # - For regional operations, use the `regionOperations` resource.
1794 # - For zonal operations, use the `zonalOperations` resource.
1795 #
1796 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1797 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1798 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1799 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1800 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1801 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1802 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001803 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001804 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1805 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1806 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001807 },
1808 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001809 },
1810 &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`.
1811 &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.
1812 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1813 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1814 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1815 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001816 &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 -08001817 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1818 &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.
1819 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1820 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1821 &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.
1822 &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`.
1823 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1824 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1825 &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.
1826 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1827 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1828 {
1829 &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.
1830 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1831 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1832 {
1833 &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).
1834 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1835 },
1836 ],
1837 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1838 },
1839 ],
1840 &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.
1841}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001842</div>
1843
1844<div class="method">
1845 <code class="details" id="recreateInstances">recreateInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001846 <pre>Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001847
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001848If 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.
1849
1850You can specify a maximum of 1000 instances with this method per request.
1851
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001852Args:
1853 project: string, Project ID for this request. (required)
1854 region: string, Name of the region scoping this request. (required)
1855 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001856 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001857 The object takes the form of:
1858
1859{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001860 &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].
1861 &quot;A String&quot;,
1862 ],
1863}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001864
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001865 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.
1866
1867For 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.
1868
1869The 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 -07001870
1871Returns:
1872 An object of the form:
1873
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001874 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001875 #
1876 # Google Compute Engine has three Operation resources:
1877 #
1878 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1879 #
1880 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1881 #
1882 # Operations can be global, regional or zonal.
1883 # - For global operations, use the `globalOperations` resource.
1884 # - For regional operations, use the `regionOperations` resource.
1885 # - For zonal operations, use the `zonalOperations` resource.
1886 #
1887 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1888 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1889 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1890 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1891 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1892 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1893 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001894 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001895 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1896 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1897 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001898 },
1899 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001900 },
1901 &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`.
1902 &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.
1903 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1904 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1905 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1906 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001907 &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 -08001908 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1909 &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.
1910 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1911 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1912 &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.
1913 &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`.
1914 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1915 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1916 &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.
1917 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1918 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1919 {
1920 &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.
1921 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1922 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1923 {
1924 &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).
1925 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1926 },
1927 ],
1928 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1929 },
1930 ],
1931 &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.
1932}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001933</div>
1934
1935<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001936 <code class="details" id="resize">resize(project, region, instanceGroupManager, size, requestId=None)</code>
1937 <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.
1938
1939The 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 -07001940
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001941If 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.
1942
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001943Args:
1944 project: string, Project ID for this request. (required)
1945 region: string, Name of the region scoping this request. (required)
1946 instanceGroupManager: string, Name of the managed instance group. (required)
1947 size: integer, Number of instances that should exist in this instance group manager. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001948 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.
1949
1950For 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.
1951
1952The 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 -07001953
1954Returns:
1955 An object of the form:
1956
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001958 #
1959 # Google Compute Engine has three Operation resources:
1960 #
1961 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1962 #
1963 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1964 #
1965 # Operations can be global, regional or zonal.
1966 # - For global operations, use the `globalOperations` resource.
1967 # - For regional operations, use the `regionOperations` resource.
1968 # - For zonal operations, use the `zonalOperations` resource.
1969 #
1970 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1971 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1972 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1973 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1974 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1975 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1976 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001977 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001978 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1979 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1980 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001981 },
1982 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001983 },
1984 &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`.
1985 &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.
1986 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1987 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1988 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1989 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001990 &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 -08001991 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1992 &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.
1993 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1994 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1995 &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.
1996 &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`.
1997 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1998 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1999 &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.
2000 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2001 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2002 {
2003 &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.
2004 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2005 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2006 {
2007 &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).
2008 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2009 },
2010 ],
2011 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2012 },
2013 ],
2014 &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.
2015}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002016</div>
2017
2018<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002019 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002020 <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 -07002021
2022Args:
2023 project: string, Project ID for this request. (required)
2024 region: string, Name of the region scoping this request. (required)
2025 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002026 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002027 The object takes the form of:
2028
2029{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002030 &quot;autoHealingPolicies&quot;: [
2031 {
2032 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2033 &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].
2034 },
2035 ],
2036}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002037
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002038 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.
2039
2040For 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.
2041
2042The 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 -07002043
2044Returns:
2045 An object of the form:
2046
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002047 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002048 #
2049 # Google Compute Engine has three Operation resources:
2050 #
2051 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2052 #
2053 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2054 #
2055 # Operations can be global, regional or zonal.
2056 # - For global operations, use the `globalOperations` resource.
2057 # - For regional operations, use the `regionOperations` resource.
2058 # - For zonal operations, use the `zonalOperations` resource.
2059 #
2060 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2061 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2062 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2063 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2064 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2065 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2066 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002067 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002068 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2069 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2070 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002071 },
2072 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002073 },
2074 &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`.
2075 &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.
2076 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2077 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2078 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2079 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002080 &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 -08002081 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2082 &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.
2083 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2084 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2085 &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.
2086 &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`.
2087 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2088 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2089 &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.
2090 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2091 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2092 {
2093 &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.
2094 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2095 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2096 {
2097 &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).
2098 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2099 },
2100 ],
2101 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2102 },
2103 ],
2104 &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.
2105}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002106</div>
2107
2108<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002109 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002110 <pre>Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
2111
2112Args:
2113 project: string, Project ID for this request. (required)
2114 region: string, Name of the region scoping this request. (required)
2115 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002116 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002117 The object takes the form of:
2118
2119{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002120 &quot;instanceTemplate&quot;: &quot;A String&quot;, # URL of the InstanceTemplate resource from which all new instances will be created.
2121}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002122
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002123 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.
2124
2125For 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.
2126
2127The 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 -07002128
2129Returns:
2130 An object of the form:
2131
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002132 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002133 #
2134 # Google Compute Engine has three Operation resources:
2135 #
2136 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2137 #
2138 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2139 #
2140 # Operations can be global, regional or zonal.
2141 # - For global operations, use the `globalOperations` resource.
2142 # - For regional operations, use the `regionOperations` resource.
2143 # - For zonal operations, use the `zonalOperations` resource.
2144 #
2145 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2146 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2147 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2148 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2149 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2150 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2151 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002152 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002153 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2154 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2155 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002156 },
2157 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002158 },
2159 &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`.
2160 &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.
2161 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2162 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2163 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2164 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002165 &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 -08002166 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2167 &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.
2168 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2169 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2170 &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.
2171 &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`.
2172 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2173 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2174 &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.
2175 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2176 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2177 {
2178 &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.
2179 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2180 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2181 {
2182 &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).
2183 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2184 },
2185 ],
2186 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2187 },
2188 ],
2189 &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.
2190}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002191</div>
2192
2193<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002194 <code class="details" id="setTargetPools">setTargetPools(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002195 <pre>Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
2196
2197Args:
2198 project: string, Project ID for this request. (required)
2199 region: string, Name of the region scoping this request. (required)
2200 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002201 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002202 The object takes the form of:
2203
2204{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002205 &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.
2206 &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.
2207 &quot;A String&quot;,
2208 ],
2209}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002210
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002211 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.
2212
2213For 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.
2214
2215The 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 -07002216
2217Returns:
2218 An object of the form:
2219
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002220 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002221 #
2222 # Google Compute Engine has three Operation resources:
2223 #
2224 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2225 #
2226 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2227 #
2228 # Operations can be global, regional or zonal.
2229 # - For global operations, use the `globalOperations` resource.
2230 # - For regional operations, use the `regionOperations` resource.
2231 # - For zonal operations, use the `zonalOperations` resource.
2232 #
2233 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2234 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2235 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2236 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2237 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2238 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2239 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002240 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002241 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2242 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2243 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002244 },
2245 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002246 },
2247 &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`.
2248 &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.
2249 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2250 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2251 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2252 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002253 &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 -08002254 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2255 &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.
2256 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2257 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2258 &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.
2259 &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`.
2260 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2261 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2262 &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.
2263 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2264 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2265 {
2266 &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.
2267 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2268 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2269 {
2270 &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).
2271 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2272 },
2273 ],
2274 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2275 },
2276 ],
2277 &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.
2278}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002279</div>
2280
2281<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002282 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002283 <pre>Returns permissions that a caller has on the specified resource.
2284
2285Args:
2286 project: string, Project ID for this request. (required)
2287 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002288 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002289 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002290 The object takes the form of:
2291
2292{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002293 &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.
2294 &quot;A String&quot;,
2295 ],
2296}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002297
2298
2299Returns:
2300 An object of the form:
2301
2302 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002303 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2304 &quot;A String&quot;,
2305 ],
2306}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002307</div>
2308
2309<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002310 <code class="details" id="update">update(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002311 <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.
2312
2313Args:
2314 project: string, Project ID for this request. (required)
2315 region: string, Name of the region scoping this request. (required)
2316 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002317 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002318 The object takes the form of:
2319
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002320{ # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002321 #
2322 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2323 #
2324 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2325 #
2326 # 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 -07002327 &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 -07002328 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002329 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2330 &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 -07002331 },
2332 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002333 &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.
2334 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2335 &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.
2336 &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.
2337 &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 -07002338 #
2339 # 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 -07002340 &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.
2341 &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.
2342 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2343 &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.
2344 &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.
2345 &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.
2346 &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 -07002347 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002348 &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 -07002349 &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 -08002350 &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 -07002351 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002352 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002353 &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 -07002354 },
2355 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002356 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002357 &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.
2358 &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.
2359 #
2360 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2361 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2362 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002363 &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 -07002364 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2365 &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.
2366 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2367 { # The named port. For example: .
2368 &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.
2369 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
2370 },
2371 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002372 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2373 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
2374 &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.
2375 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
2376 &quot;preservedState&quot;: { # Configuration of preserved resources.
2377 &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.
2378 &quot;a_key&quot;: {
2379 &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 -07002380 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002381 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002382 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002383 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002384 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
2385 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
2386 &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.
2387 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
2388 &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.
2389 &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 -07002390 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
2391 &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.
2392 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002393 },
2394 &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.
2395 &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.
2396 },
2397 },
2398 &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.
2399 &quot;A String&quot;,
2400 ],
2401 &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.
2402 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
2403 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
2404 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
2405 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002406 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxSurge is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07002407 #
2408 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2409 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2410 #
2411 #
2412 # - If the value is fixed, then the calculated value is equal to the fixed value.
2413 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
2414 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2415 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2416 },
2417 &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:
2418 #
2419 #
2420 # - The instance&#x27;s status is RUNNING.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002421 # - If there is a health check on the instance group, the instance&#x27;s health check status must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded up if necessary. The default value for maxUnavailable is a fixed value equal to the number of zones in which the managed instance group operates.
Bu Sun Kim65020912020-05-20 12:08:20 -07002422 #
2423 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2424 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2425 #
2426 #
2427 # - If the value is fixed, then the calculated value is equal to the fixed value.
2428 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
2429 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2430 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2431 },
2432 &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].
2433 &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.
2434 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
2435 &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).
2436 },
2437 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
2438 #
2439 # 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.
2440 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002441 &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 -07002442 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
2443 &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:
2444 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2445 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
2446 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2447 #
2448 #
2449 # - If the value is fixed, then the calculated value is equal to the fixed value.
2450 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
2451 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2452 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2453 },
2454 },
2455 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002456 &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 -07002457}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002458
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002459 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.
2460
2461For 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.
2462
2463The 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 -07002464
2465Returns:
2466 An object of the form:
2467
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002468 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002469 #
2470 # Google Compute Engine has three Operation resources:
2471 #
2472 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2473 #
2474 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2475 #
2476 # Operations can be global, regional or zonal.
2477 # - For global operations, use the `globalOperations` resource.
2478 # - For regional operations, use the `regionOperations` resource.
2479 # - For zonal operations, use the `zonalOperations` resource.
2480 #
2481 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2482 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2483 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2484 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2485 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2486 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2487 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002488 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002489 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2490 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2491 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002492 },
2493 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002494 },
2495 &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`.
2496 &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.
2497 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2498 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2499 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2500 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002501 &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 -08002502 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2503 &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.
2504 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2505 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2506 &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.
2507 &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`.
2508 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2509 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2510 &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.
2511 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2512 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2513 {
2514 &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.
2515 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2516 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2517 {
2518 &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).
2519 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2520 },
2521 ],
2522 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2523 },
2524 ],
2525 &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.
2526}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07002527</div>
2528
2529<div class="method">
2530 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002531 <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 -07002532
2533Args:
2534 project: string, Project ID for this request. (required)
2535 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
2536 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2537 body: object, The request body.
2538 The object takes the form of:
2539
2540{ # RegionInstanceGroupManagers.updatePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002541 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
2542 {
2543 &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.
2544 &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.
2545 &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.
2546 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2547 &quot;a_key&quot;: {
2548 &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.
2549 &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.
2550 &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 -07002551 },
2552 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002553 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2554 &quot;a_key&quot;: &quot;A String&quot;,
2555 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002556 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002557 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
2558 },
2559 ],
2560}
Dan O'Mearadd494642020-05-01 07:42:23 -07002561
2562 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.
2563
2564For 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.
2565
2566The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2567
2568Returns:
2569 An object of the form:
2570
2571 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002572 #
2573 # Google Compute Engine has three Operation resources:
2574 #
2575 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2576 #
2577 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2578 #
2579 # Operations can be global, regional or zonal.
2580 # - For global operations, use the `globalOperations` resource.
2581 # - For regional operations, use the `regionOperations` resource.
2582 # - For zonal operations, use the `zonalOperations` resource.
2583 #
2584 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2585 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2586 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2587 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2588 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2589 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2590 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002591 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002592 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2593 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2594 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002595 },
2596 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002597 },
2598 &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`.
2599 &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.
2600 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2601 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2602 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2603 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002604 &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 -08002605 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2606 &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.
2607 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2608 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2609 &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.
2610 &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`.
2611 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2612 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2613 &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.
2614 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2615 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2616 {
2617 &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.
2618 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2619 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2620 {
2621 &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).
2622 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2623 },
2624 ],
2625 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2626 },
2627 ],
2628 &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.
2629}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002630</div>
2631
2632</body></html>