blob: a35bd0120e0836dc8e77ffc54b2414c7e6cf93eb [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#createInstances">createInstances(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
85<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>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, region, instanceGroupManager, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Deletes the specified managed instance group and all of the instances in that group.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#deleteInstances">deleteInstances(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<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 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#deletePerInstanceConfigs">deletePerInstanceConfigs(project, region, instanceGroupManager, body=None)</a></code></p>
94<p class="firstline">Deletes selected per-instance configs for the managed instance group.</p>
95<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070096 <code><a href="#get">get(project, region, instanceGroupManager)</a></code></p>
97<p class="firstline">Returns all of the details about the specified managed instance group.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<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 -0700101<p class="toc_element">
102 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
103<p class="firstline">Retrieves the list of managed instance groups that are contained within the specified region.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#listErrors">listErrors(project, region, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
106<p class="firstline">Lists all errors thrown by actions on instances for a given regional managed instance group.</p>
107<p class="toc_element">
108 <code><a href="#listErrors_next">listErrors_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
111 <code><a href="#listManagedInstances">listManagedInstances(project, region, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<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.</p>
113<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400114 <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#listPerInstanceConfigs">listPerInstanceConfigs(project, region, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
118<p class="firstline">Lists all of the per-instance configs defined for the managed instance group.</p>
119<p class="toc_element">
120 <code><a href="#listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</a></code></p>
121<p class="firstline">Retrieves the next page of results.</p>
122<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700123 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
124<p class="firstline">Retrieves the next page of results.</p>
125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#patch">patch(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127<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 -0700128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code><a href="#patchPerInstanceConfigs">patchPerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
130<p class="firstline">Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.</p>
131<p class="toc_element">
132 <code><a href="#recreateInstances">recreateInstances(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133<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 -0700134<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 <code><a href="#resize">resize(project, region, instanceGroupManager, size, requestId=None)</a></code></p>
136<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 -0700137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139<p class="firstline">Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.</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="#setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142<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>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#setTargetPools">setTargetPools(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145<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>
146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700148<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#update">update(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700151<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 -0700152<p class="toc_element">
153 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</a></code></p>
154<p class="firstline">Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155<h3>Method Details</h3>
156<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 <code class="details" id="abandonInstances">abandonInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 <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 -0700159
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400160If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
161
162You can specify a maximum of 1000 instances with this method per request.
163
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700164Args:
165 project: string, Project ID for this request. (required)
166 region: string, Name of the region scoping this request. (required)
167 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169 The object takes the form of:
170
171{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400172 "instances": [ # 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].
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700173 "A String",
174 ],
175 }
176
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
178
179For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
180
181The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700182
183Returns:
184 An object of the form:
185
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 { # Represents an Operation resource.
187 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 # Google Compute Engine has three Operation resources:
189 #
190 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
191 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
193 #
194 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 # - For global operations, use the `globalOperations` resource.
196 # - For regional operations, use the `regionOperations` resource.
197 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400202 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700203 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700205 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700206 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
207 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700208 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700210 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700212 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
213 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
214 {
215 "message": "A String", # [Output Only] A human-readable description of the warning code.
216 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
217 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
218 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
219 {
220 "value": "A String", # [Output Only] A warning data value corresponding to the key.
221 "key": "A String", # [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).
222 },
223 ],
224 },
225 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700227 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
229 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700231 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
232 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
233 {
234 "message": "A String", # [Output Only] An optional, human-readable error message.
235 "code": "A String", # [Output Only] The error type identifier for this error.
236 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
237 },
238 ],
239 },
240 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
241 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800242 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700243 }</pre>
244</div>
245
246<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700247 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, region, instanceGroupManager, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 <pre>Apply updates to selected instances the managed instance group.
249
250Args:
251 project: string, Project ID for this request. (required)
252 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
253 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700254 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700255 The object takes the form of:
256
257{ # InstanceGroupManagers.applyUpdatesToInstances
258 "instances": [ # 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].
259 "A String",
260 ],
261 "mostDisruptiveAllowedAction": "A String", # The most disruptive action that you want to perform on each instance during the update:
262 # - REPLACE: Delete the instance and create it again.
263 # - RESTART: Stop the instance and start it again.
264 # - REFRESH: Do not stop the instance.
265 # - 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.
266 "minimalAction": "A String", # 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 }
272
273
274Returns:
275 An object of the form:
276
277 { # Represents an Operation resource.
278 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 # Google Compute Engine has three Operation resources:
280 #
281 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
282 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
284 #
285 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700286 # - For global operations, use the `globalOperations` resource.
287 # - For regional operations, use the `regionOperations` resource.
288 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700290 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
292 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
293 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
296 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
298 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700302 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
304 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
305 {
306 "message": "A String", # [Output Only] A human-readable description of the warning code.
307 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
308 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
309 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
310 {
311 "value": "A String", # [Output Only] A warning data value corresponding to the key.
312 "key": "A String", # [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).
313 },
314 ],
315 },
316 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700317 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
320 "name": "A String", # [Output Only] Name of the operation.
321 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
322 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
323 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
324 {
325 "message": "A String", # [Output Only] An optional, human-readable error message.
326 "code": "A String", # [Output Only] The error type identifier for this error.
327 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
328 },
329 ],
330 },
331 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
332 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
333 "targetLink": "A String", # [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.
334 }</pre>
335</div>
336
337<div class="method">
338 <code class="details" id="createInstances">createInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
339 <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.
340
341Args:
342 project: string, Project ID for this request. (required)
343 region: string, The name of the region where the managed instance group is located. It should conform to RFC1035. (required)
344 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
345 body: object, The request body.
346 The object takes the form of:
347
348{ # RegionInstanceGroupManagers.createInstances
349 "instances": [ # [Required] List of specifications of per-instance configs.
350 {
351 "name": "A String", # 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't exist or is not part of the group will result in an error.
352 "preservedState": { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
353 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
354 "a_key": {
355 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
356 "mode": "A String", # 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.
357 "autoDelete": "A String", # 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.
358 },
359 },
360 "metadata": { # Preserved metadata defined for this instance.
361 "a_key": "A String",
362 },
363 },
364 "fingerprint": "A String", # 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.
365 },
366 ],
367 }
368
369 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.
370
371For 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.
372
373The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
374
375Returns:
376 An object of the form:
377
378 { # Represents an Operation resource.
379 #
380 # Google Compute Engine has three Operation resources:
381 #
382 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
383 #
384 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
385 #
386 # Operations can be global, regional or zonal.
387 # - For global operations, use the `globalOperations` resource.
388 # - For regional operations, use the `regionOperations` resource.
389 # - For zonal operations, use the `zonalOperations` resource.
390 #
391 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
392 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
393 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
394 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
395 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
396 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
397 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
398 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
399 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
400 "progress": 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.
401 "httpErrorStatusCode": 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.
402 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
403 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
404 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
405 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
406 {
407 "message": "A String", # [Output Only] A human-readable description of the warning code.
408 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
409 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
410 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
411 {
412 "value": "A String", # [Output Only] A warning data value corresponding to the key.
413 "key": "A String", # [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).
414 },
415 ],
416 },
417 ],
418 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
419 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
420 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
421 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
423 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
424 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
425 {
426 "message": "A String", # [Output Only] An optional, human-readable error message.
427 "code": "A String", # [Output Only] The error type identifier for this error.
428 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
429 },
430 ],
431 },
432 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
433 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
434 "targetLink": "A String", # [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.
435 }</pre>
436</div>
437
438<div class="method">
439 <code class="details" id="delete">delete(project, region, instanceGroupManager, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700440 <pre>Deletes the specified managed instance group and all of the instances in that group.
441
442Args:
443 project: string, Project ID for this request. (required)
444 region: string, Name of the region scoping this request. (required)
445 instanceGroupManager: string, Name of the managed instance group to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 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.
447
448For 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.
449
450The 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 -0700451
452Returns:
453 An object of the form:
454
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 { # Represents an Operation resource.
456 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 # Google Compute Engine has three Operation resources:
458 #
459 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
460 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
462 #
463 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 # - For global operations, use the `globalOperations` resource.
465 # - For regional operations, use the `regionOperations` resource.
466 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700467 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700468 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700469 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400471 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700472 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700473 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700475 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
476 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700477 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700478 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700479 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700480 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700481 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
482 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
483 {
484 "message": "A String", # [Output Only] A human-readable description of the warning code.
485 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
486 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
487 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
488 {
489 "value": "A String", # [Output Only] A warning data value corresponding to the key.
490 "key": "A String", # [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).
491 },
492 ],
493 },
494 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700495 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700496 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700497 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
498 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700499 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700500 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
501 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
502 {
503 "message": "A String", # [Output Only] An optional, human-readable error message.
504 "code": "A String", # [Output Only] The error type identifier for this error.
505 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
506 },
507 ],
508 },
509 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
510 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800511 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700512 }</pre>
513</div>
514
515<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700516 <code class="details" id="deleteInstances">deleteInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 <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 -0700518
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400519If 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.
520
521You can specify a maximum of 1000 instances with this method per request.
522
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523Args:
524 project: string, Project ID for this request. (required)
525 region: string, Name of the region scoping this request. (required)
526 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700527 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700528 The object takes the form of:
529
530{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400531 "instances": [ # 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].
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700532 "A String",
533 ],
534 }
535
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 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.
537
538For 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.
539
540The 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 -0700541
542Returns:
543 An object of the form:
544
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 { # Represents an Operation resource.
546 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 # Google Compute Engine has three Operation resources:
548 #
549 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
550 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
552 #
553 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700554 # - For global operations, use the `globalOperations` resource.
555 # - For regional operations, use the `regionOperations` resource.
556 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700558 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700559 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700560 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400561 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700562 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700564 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700565 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
566 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700567 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700569 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700570 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700571 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
572 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
573 {
574 "message": "A String", # [Output Only] A human-readable description of the warning code.
575 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
576 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
577 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
578 {
579 "value": "A String", # [Output Only] A warning data value corresponding to the key.
580 "key": "A String", # [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).
581 },
582 ],
583 },
584 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700585 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700586 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
588 "name": "A String", # [Output Only] Name of the operation.
589 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
590 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
591 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
592 {
593 "message": "A String", # [Output Only] An optional, human-readable error message.
594 "code": "A String", # [Output Only] The error type identifier for this error.
595 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
596 },
597 ],
598 },
599 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
600 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
601 "targetLink": "A String", # [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 }</pre>
603</div>
604
605<div class="method">
606 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, region, instanceGroupManager, body=None)</code>
607 <pre>Deletes selected per-instance configs for the managed instance group.
608
609Args:
610 project: string, Project ID for this request. (required)
611 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
612 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
613 body: object, The request body.
614 The object takes the form of:
615
616{ # RegionInstanceGroupManagers.deletePerInstanceConfigs
617 "names": [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
618 "A String",
619 ],
620 }
621
622
623Returns:
624 An object of the form:
625
626 { # Represents an Operation resource.
627 #
628 # Google Compute Engine has three Operation resources:
629 #
630 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
631 #
632 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
633 #
634 # Operations can be global, regional or zonal.
635 # - For global operations, use the `globalOperations` resource.
636 # - For regional operations, use the `regionOperations` resource.
637 # - For zonal operations, use the `zonalOperations` resource.
638 #
639 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
640 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
641 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
642 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
643 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
644 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
645 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
646 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
647 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
648 "progress": 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.
649 "httpErrorStatusCode": 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.
650 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
651 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
652 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
653 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
654 {
655 "message": "A String", # [Output Only] A human-readable description of the warning code.
656 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
657 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
658 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
659 {
660 "value": "A String", # [Output Only] A warning data value corresponding to the key.
661 "key": "A String", # [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).
662 },
663 ],
664 },
665 ],
666 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
667 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
668 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
669 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700671 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
672 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
673 {
674 "message": "A String", # [Output Only] An optional, human-readable error message.
675 "code": "A String", # [Output Only] The error type identifier for this error.
676 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
677 },
678 ],
679 },
680 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
681 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800682 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700683 }</pre>
684</div>
685
686<div class="method">
687 <code class="details" id="get">get(project, region, instanceGroupManager)</code>
688 <pre>Returns all of the details about the specified managed instance group.
689
690Args:
691 project: string, Project ID for this request. (required)
692 region: string, Name of the region scoping this request. (required)
693 instanceGroupManager: string, Name of the managed instance group to return. (required)
694
695Returns:
696 An object of the form:
697
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 { # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700699 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
Dan O'Mearadd494642020-05-01 07:42:23 -0700701 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700702 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700703 #
704 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700705 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700706 "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
707 "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
708 "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
709 "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
710 "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
711 },
712 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700713 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
715 "serviceAccount": "A String", # 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.
716 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
717 "baseInstanceName": "A String", # 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.
718 "updatePolicy": { # The update policy for this managed instance group.
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
721 #
722 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
723 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
724 #
725 #
726 # - If the value is fixed, then the calculated value is equal to the fixed value.
727 # - 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.
728 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
729 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
730 },
731 "minimalAction": "A String", # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700732 "instanceRedistributionType": "A String", # The instance redistribution policy for regional managed instance groups. Valid values are:
733 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
734 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 "maxUnavailable": { # 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:
736 #
737 #
738 # - The instance's status is RUNNING.
739 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
740 #
741 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
742 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
743 #
744 #
745 # - If the value is fixed, then the calculated value is equal to the fixed value.
746 # - 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.
747 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
748 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
749 },
750 "type": "A String", # 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).
751 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
752 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700753 "targetPools": [ # 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.
754 "A String",
755 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700756 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
757 { # The named port. For example: .
758 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
759 "port": 42, # The port number, which can be a value between 1 and 65535.
760 },
761 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 "status": { # [Output Only] The status of this managed instance group.
Dan O'Mearadd494642020-05-01 07:42:23 -0700763 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
764 "isStateful": 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.
765 "hasStatefulConfig": 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.
766 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700767 "isStable": 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.
768 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
769 "isReached": 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' target version are specified by version field on Instance Group Manager.
770 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700771 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700772 },
773 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
774 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
775 {
776 "healthCheck": "A String", # The URL for the health check that signals autohealing.
777 "initialDelaySec": 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].
778 },
779 ],
780 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700781 "targetSize": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700782 "instanceTemplate": "A String", # 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.
783 "fingerprint": "A String", # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
786 "currentActions": { # [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.
787 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
788 "recreating": 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.
789 "creating": 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.
790 #
791 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
792 "verifying": 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.
793 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
794 "abandoning": 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.
795 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
796 "creatingWithoutRetries": 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's targetSize value accordingly.
797 "refreshing": 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.
798 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700799 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700800 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 # 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.
803 {
804 "targetSize": { # 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:
805 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
806 # - 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.
807 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
808 #
809 #
810 # - If the value is fixed, then the calculated value is equal to the fixed value.
811 # - 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.
812 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
813 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
814 },
815 "instanceTemplate": "A String", # 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.
816 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
817 },
818 ],
819 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
820 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
821 "zones": [ # Zones where the regional managed instance group will create and manage instances.
822 {
823 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
824 },
825 ],
826 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700827 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
828 "preservedState": { # Configuration of preserved resources.
829 "disks": { # 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.
830 "a_key": {
831 "autoDelete": "A String", # 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.
832 },
833 },
834 },
835 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 }</pre>
838</div>
839
840<div class="method">
841 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
842 <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.
843
844A regional managed instance group can contain up to 2000 instances.
845
846Args:
847 project: string, Project ID for this request. (required)
848 region: string, Name of the region scoping this request. (required)
849 body: object, The request body.
850 The object takes the form of:
851
852{ # Represents a Managed Instance Group resource.
853 #
854 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
855 #
856 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
857 #
858 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
859 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
860 "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
861 "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
862 "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
863 "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
864 "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
865 },
866 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
867 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
868 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
869 "serviceAccount": "A String", # 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.
870 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
871 "baseInstanceName": "A String", # 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.
872 "updatePolicy": { # The update policy for this managed instance group.
873 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
874 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
875 #
876 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
877 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
878 #
879 #
880 # - If the value is fixed, then the calculated value is equal to the fixed value.
881 # - 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.
882 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
883 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
884 },
885 "minimalAction": "A String", # 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.
886 "instanceRedistributionType": "A String", # The instance redistribution policy for regional managed instance groups. Valid values are:
887 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
888 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
889 "maxUnavailable": { # 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:
890 #
891 #
892 # - The instance's status is RUNNING.
893 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
894 #
895 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
896 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
897 #
898 #
899 # - If the value is fixed, then the calculated value is equal to the fixed value.
900 # - 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.
901 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
902 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
903 },
904 "type": "A String", # 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).
905 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
906 },
907 "targetPools": [ # 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.
908 "A String",
909 ],
910 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
911 { # The named port. For example: .
912 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
913 "port": 42, # The port number, which can be a value between 1 and 65535.
914 },
915 ],
916 "status": { # [Output Only] The status of this managed instance group.
917 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
918 "isStateful": 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.
919 "hasStatefulConfig": 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.
920 },
921 "isStable": 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.
922 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
923 "isReached": 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' target version are specified by version field on Instance Group Manager.
924 },
925 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager.
926 },
927 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
928 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
929 {
930 "healthCheck": "A String", # The URL for the health check that signals autohealing.
931 "initialDelaySec": 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].
932 },
933 ],
934 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
935 "targetSize": 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.
936 "instanceTemplate": "A String", # 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.
937 "fingerprint": "A String", # 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.
938 #
939 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
940 "currentActions": { # [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.
941 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
942 "recreating": 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.
943 "creating": 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.
944 #
945 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
946 "verifying": 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.
947 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
948 "abandoning": 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.
949 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
950 "creatingWithoutRetries": 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's targetSize value accordingly.
951 "refreshing": 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.
952 },
953 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
954 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
955 #
956 # 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.
957 {
958 "targetSize": { # 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:
959 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
960 # - 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.
961 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
962 #
963 #
964 # - If the value is fixed, then the calculated value is equal to the fixed value.
965 # - 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.
966 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
967 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
968 },
969 "instanceTemplate": "A String", # 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.
970 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
971 },
972 ],
973 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
974 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
975 "zones": [ # Zones where the regional managed instance group will create and manage instances.
976 {
977 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
978 },
979 ],
980 },
981 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
982 "preservedState": { # Configuration of preserved resources.
983 "disks": { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
984 "a_key": {
985 "autoDelete": "A String", # 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.
986 },
987 },
988 },
989 },
990 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
991}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700992
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700993 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.
994
995For 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.
996
997The 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 -0700998
999Returns:
1000 An object of the form:
1001
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001002 { # Represents an Operation resource.
1003 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 # Google Compute Engine has three Operation resources:
1005 #
1006 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1007 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001008 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1009 #
1010 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001011 # - For global operations, use the `globalOperations` resource.
1012 # - For regional operations, use the `regionOperations` resource.
1013 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001014 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001015 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001016 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001017 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001018 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001020 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001021 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001022 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1023 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001024 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001025 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001026 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001027 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001028 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1029 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1030 {
1031 "message": "A String", # [Output Only] A human-readable description of the warning code.
1032 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1033 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1034 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1035 {
1036 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1037 "key": "A String", # [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).
1038 },
1039 ],
1040 },
1041 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001042 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001043 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1045 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001047 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1048 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1049 {
1050 "message": "A String", # [Output Only] An optional, human-readable error message.
1051 "code": "A String", # [Output Only] The error type identifier for this error.
1052 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1053 },
1054 ],
1055 },
1056 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1057 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001058 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001059 }</pre>
1060</div>
1061
1062<div class="method">
1063 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1064 <pre>Retrieves the list of managed instance groups that are contained within the specified region.
1065
1066Args:
1067 project: string, Project ID for this request. (required)
1068 region: string, Name of the region scoping this request. (required)
1069 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1070
Dan O'Mearadd494642020-05-01 07:42:23 -07001071You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001072
Dan O'Mearadd494642020-05-01 07:42:23 -07001073Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1074 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`)
1075 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.
1076 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 -07001077
Dan O'Mearadd494642020-05-01 07:42:23 -07001078For 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 -07001079
Dan O'Mearadd494642020-05-01 07:42:23 -07001080You 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 -07001081
Dan O'Mearadd494642020-05-01 07:42:23 -07001082To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001083
1084Returns:
1085 An object of the form:
1086
1087 { # Contains a list of managed instance groups.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001088 "nextPageToken": "A String", # [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.
1089 "kind": "compute#regionInstanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups that exist in th regional scope.
1090 "items": [ # A list of InstanceGroupManager resources.
1091 { # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001092 #
1093 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1094 #
1095 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1096 #
1097 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1098 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1099 "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1100 "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1101 "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1102 "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
1103 "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001104 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001105 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1106 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1107 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1108 "serviceAccount": "A String", # 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.
1109 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1110 "baseInstanceName": "A String", # 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.
1111 "updatePolicy": { # The update policy for this managed instance group.
1112 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
1113 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1114 #
1115 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1116 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1117 #
1118 #
1119 # - If the value is fixed, then the calculated value is equal to the fixed value.
1120 # - 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.
1121 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1122 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1123 },
1124 "minimalAction": "A String", # 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.
1125 "instanceRedistributionType": "A String", # The instance redistribution policy for regional managed instance groups. Valid values are:
1126 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1127 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1128 "maxUnavailable": { # 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:
1129 #
1130 #
1131 # - The instance's status is RUNNING.
1132 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1133 #
1134 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1135 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1136 #
1137 #
1138 # - If the value is fixed, then the calculated value is equal to the fixed value.
1139 # - 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.
1140 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1141 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1142 },
1143 "type": "A String", # 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).
1144 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1145 },
1146 "targetPools": [ # 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.
1147 "A String",
1148 ],
1149 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1150 { # The named port. For example: .
1151 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1152 "port": 42, # The port number, which can be a value between 1 and 65535.
1153 },
1154 ],
1155 "status": { # [Output Only] The status of this managed instance group.
1156 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
1157 "isStateful": 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.
1158 "hasStatefulConfig": 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.
1159 },
1160 "isStable": 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.
1161 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1162 "isReached": 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' target version are specified by version field on Instance Group Manager.
1163 },
1164 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1165 },
1166 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1167 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1168 {
1169 "healthCheck": "A String", # The URL for the health check that signals autohealing.
1170 "initialDelaySec": 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].
1171 },
1172 ],
1173 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1174 "targetSize": 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.
1175 "instanceTemplate": "A String", # 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.
1176 "fingerprint": "A String", # 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.
1177 #
1178 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1179 "currentActions": { # [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.
1180 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1181 "recreating": 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.
1182 "creating": 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.
1183 #
1184 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1185 "verifying": 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.
1186 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1187 "abandoning": 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.
1188 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1189 "creatingWithoutRetries": 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's targetSize value accordingly.
1190 "refreshing": 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.
1191 },
1192 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1193 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1194 #
1195 # 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.
1196 {
1197 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
1198 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1199 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1200 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1201 #
1202 #
1203 # - If the value is fixed, then the calculated value is equal to the fixed value.
1204 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1205 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1206 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1207 },
1208 "instanceTemplate": "A String", # 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.
1209 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1210 },
1211 ],
1212 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1213 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1214 "zones": [ # Zones where the regional managed instance group will create and manage instances.
1215 {
1216 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1217 },
1218 ],
1219 },
1220 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
1221 "preservedState": { # Configuration of preserved resources.
1222 "disks": { # 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.
1223 "a_key": {
1224 "autoDelete": "A String", # 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.
1225 },
1226 },
1227 },
1228 },
1229 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1230 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001231 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001232 "warning": { # [Output Only] Informational warning message.
1233 "message": "A String", # [Output Only] A human-readable description of the warning code.
1234 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1235 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1236 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1237 {
1238 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1239 "key": "A String", # [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).
1240 },
1241 ],
1242 },
1243 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1244 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001245 }</pre>
1246</div>
1247
1248<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001249 <code class="details" id="listErrors">listErrors(project, region, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1250 <pre>Lists all errors thrown by actions on instances for a given regional managed instance group.
1251
1252Args:
1253 project: string, Project ID for this request. (required)
1254 region: string, Name of the region scoping this request. This should conform to RFC1035. (required)
1255 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)
1256 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1257
1258You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
1259
1260Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1261 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`)
1262 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.
1263 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;`.
1264
1265For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1266
1267You 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.
1268
1269To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
1270
1271Returns:
1272 An object of the form:
1273
1274 {
1275 "nextPageToken": "A String", # [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.
1276 "items": [ # [Output Only] The list of errors of the managed instance group.
1277 {
1278 "timestamp": "A String", # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1279 "instanceActionDetails": { # [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.
1280 "action": "A String", # [Output Only] Action that managed instance group was executing on the instance when the error occurred. Possible values:
1281 "instance": "A String", # [Output Only] The URL of the instance. The URL can be set even if the instance has not yet been created.
1282 "version": { # [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.
1283 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1284 "name": "A String", # [Output Only] Name of the version.
1285 },
1286 },
1287 "error": { # [Output Only] Contents of the error.
1288 "message": "A String", # [Output Only] Error message.
1289 "code": "A String", # [Output Only] Error code.
1290 },
1291 },
1292 ],
1293 }</pre>
1294</div>
1295
1296<div class="method">
1297 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1298 <pre>Retrieves the next page of results.
1299
1300Args:
1301 previous_request: The request for the previous page. (required)
1302 previous_response: The response from the request for the previous page. (required)
1303
1304Returns:
1305 A request object that you can call 'execute()' on to request the next
1306 page. Returns None if there are no more items in the collection.
1307 </pre>
1308</div>
1309
1310<div class="method">
1311 <code class="details" id="listManagedInstances">listManagedInstances(project, region, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001312 <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.
1313
1314Args:
1315 project: string, Project ID for this request. (required)
1316 region: string, Name of the region scoping this request. (required)
1317 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001318 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001319
Dan O'Mearadd494642020-05-01 07:42:23 -07001320You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001321
Dan O'Mearadd494642020-05-01 07:42:23 -07001322Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1323 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`)
1324 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.
1325 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 -07001326
Dan O'Mearadd494642020-05-01 07:42:23 -07001327For 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 -07001328
Dan O'Mearadd494642020-05-01 07:42:23 -07001329You 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 -07001330
Dan O'Mearadd494642020-05-01 07:42:23 -07001331To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001332
1333Returns:
1334 An object of the form:
1335
1336 {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001337 "nextPageToken": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 "managedInstances": [ # A list of managed instances.
1339 { # A Managed Instance resource.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001340 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
Dan O'Mearadd494642020-05-01 07:42:23 -07001341 "instanceHealth": [ # [Output Only] Health state of the instance per health-check.
1342 {
1343 "healthCheck": "A String", # [Output Only] The URL for the health check that verifies whether the instance is healthy.
1344 "detailedHealthState": "A String", # [Output Only] The current detailed instance health state.
1345 },
1346 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001347 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
1348 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1349 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1350 {
1351 "message": "A String", # [Output Only] An optional, human-readable error message.
1352 "code": "A String", # [Output Only] The error type identifier for this error.
1353 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1354 },
1355 ],
1356 },
1357 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001358 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
Dan O'Mearadd494642020-05-01 07:42:23 -07001359 "preservedStateFromPolicy": { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1360 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1361 "a_key": {
1362 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
1363 "mode": "A String", # 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.
1364 "autoDelete": "A String", # 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.
1365 },
1366 },
1367 "metadata": { # Preserved metadata defined for this instance.
1368 "a_key": "A String",
1369 },
1370 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001371 "version": { # [Output Only] Intended version of this instance.
1372 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1373 "name": "A String", # [Output Only] Name of the version.
1374 },
1375 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1376 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1377 # - 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.
1378 # - 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's targetSize value is decreased instead.
1379 # - RECREATING The managed instance group is recreating this instance.
1380 # - DELETING The managed instance group is permanently deleting this instance.
1381 # - 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.
1382 # - RESTARTING The managed instance group is restarting the instance.
1383 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001384 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001385 "preservedStateFromConfig": { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1386 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1387 "a_key": {
1388 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
1389 "mode": "A String", # 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.
1390 "autoDelete": "A String", # 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.
1391 },
1392 },
1393 "metadata": { # Preserved metadata defined for this instance.
1394 "a_key": "A String",
1395 },
1396 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001397 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001398 },
1399 ],
1400 }</pre>
1401</div>
1402
1403<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001404 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1405 <pre>Retrieves the next page of results.
1406
1407Args:
1408 previous_request: The request for the previous page. (required)
1409 previous_response: The response from the request for the previous page. (required)
1410
1411Returns:
1412 A request object that you can call 'execute()' on to request the next
1413 page. Returns None if there are no more items in the collection.
1414 </pre>
1415</div>
1416
1417<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 <code class="details" id="listPerInstanceConfigs">listPerInstanceConfigs(project, region, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1419 <pre>Lists all of the per-instance configs defined for the managed instance group.
1420
1421Args:
1422 project: string, Project ID for this request. (required)
1423 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
1424 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1425 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1426
1427You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
1428
1429Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1430 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`)
1431 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.
1432 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;`.
1433
1434For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1435
1436You 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.
1437
1438To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
1439
1440Returns:
1441 An object of the form:
1442
1443 {
1444 "nextPageToken": "A String", # [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.
1445 "items": [ # [Output Only] The list of PerInstanceConfig.
1446 {
1447 "name": "A String", # 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't exist or is not part of the group will result in an error.
1448 "preservedState": { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
1449 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1450 "a_key": {
1451 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
1452 "mode": "A String", # 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.
1453 "autoDelete": "A String", # 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.
1454 },
1455 },
1456 "metadata": { # Preserved metadata defined for this instance.
1457 "a_key": "A String",
1458 },
1459 },
1460 "fingerprint": "A String", # 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.
1461 },
1462 ],
1463 "warning": { # [Output Only] Informational warning message.
1464 "message": "A String", # [Output Only] A human-readable description of the warning code.
1465 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1466 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1467 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1468 {
1469 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1470 "key": "A String", # [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).
1471 },
1472 ],
1473 },
1474 }</pre>
1475</div>
1476
1477<div class="method">
1478 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1479 <pre>Retrieves the next page of results.
1480
1481Args:
1482 previous_request: The request for the previous page. (required)
1483 previous_response: The response from the request for the previous page. (required)
1484
1485Returns:
1486 A request object that you can call 'execute()' on to request the next
1487 page. Returns None if there are no more items in the collection.
1488 </pre>
1489</div>
1490
1491<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001492 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1493 <pre>Retrieves the next page of results.
1494
1495Args:
1496 previous_request: The request for the previous page. (required)
1497 previous_response: The response from the request for the previous page. (required)
1498
1499Returns:
1500 A request object that you can call 'execute()' on to request the next
1501 page. Returns None if there are no more items in the collection.
1502 </pre>
1503</div>
1504
1505<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001506 <code class="details" id="patch">patch(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001507 <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 -07001508
1509Args:
1510 project: string, Project ID for this request. (required)
1511 region: string, Name of the region scoping this request. (required)
1512 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001513 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001514 The object takes the form of:
1515
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001516{ # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001517 #
1518 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1519 #
1520 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1521 #
1522 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1523 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1524 "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1525 "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1526 "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1527 "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
1528 "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
1529 },
1530 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1531 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1532 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1533 "serviceAccount": "A String", # 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.
1534 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1535 "baseInstanceName": "A String", # 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.
1536 "updatePolicy": { # The update policy for this managed instance group.
1537 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
1538 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1539 #
1540 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1541 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001542 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001543 #
1544 # - If the value is fixed, then the calculated value is equal to the fixed value.
1545 # - 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.
1546 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1547 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1548 },
1549 "minimalAction": "A String", # 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.
1550 "instanceRedistributionType": "A String", # The instance redistribution policy for regional managed instance groups. Valid values are:
1551 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1552 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1553 "maxUnavailable": { # 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:
1554 #
1555 #
1556 # - The instance's status is RUNNING.
1557 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1558 #
1559 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1560 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1561 #
1562 #
1563 # - If the value is fixed, then the calculated value is equal to the fixed value.
1564 # - 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.
1565 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1566 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1567 },
1568 "type": "A String", # 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).
1569 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1570 },
1571 "targetPools": [ # 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.
1572 "A String",
1573 ],
1574 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1575 { # The named port. For example: .
1576 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1577 "port": 42, # The port number, which can be a value between 1 and 65535.
1578 },
1579 ],
1580 "status": { # [Output Only] The status of this managed instance group.
1581 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
1582 "isStateful": 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.
1583 "hasStatefulConfig": 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.
1584 },
1585 "isStable": 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.
1586 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1587 "isReached": 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' target version are specified by version field on Instance Group Manager.
1588 },
1589 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1590 },
1591 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1592 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1593 {
1594 "healthCheck": "A String", # The URL for the health check that signals autohealing.
1595 "initialDelaySec": 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].
1596 },
1597 ],
1598 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1599 "targetSize": 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.
1600 "instanceTemplate": "A String", # 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.
1601 "fingerprint": "A String", # 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.
1602 #
1603 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1604 "currentActions": { # [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.
1605 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1606 "recreating": 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.
1607 "creating": 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.
1608 #
1609 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1610 "verifying": 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.
1611 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1612 "abandoning": 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.
1613 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1614 "creatingWithoutRetries": 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's targetSize value accordingly.
1615 "refreshing": 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.
1616 },
1617 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1618 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1619 #
1620 # 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.
1621 {
1622 "targetSize": { # 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:
1623 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1624 # - 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 Kim715bd7f2019-06-14 16:50:42 -07001625 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1626 #
1627 #
1628 # - If the value is fixed, then the calculated value is equal to the fixed value.
1629 # - 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.
1630 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1631 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1632 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001633 "instanceTemplate": "A String", # 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.
1634 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001635 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001636 ],
1637 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1638 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1639 "zones": [ # Zones where the regional managed instance group will create and manage instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001640 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001641 "zone": "A String", # 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 -07001642 },
1643 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001644 },
1645 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
1646 "preservedState": { # Configuration of preserved resources.
1647 "disks": { # 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.
1648 "a_key": {
1649 "autoDelete": "A String", # 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 -07001650 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001651 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001652 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001653 },
1654 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1655}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001656
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001657 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.
1658
1659For 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.
1660
1661The 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 -07001662
1663Returns:
1664 An object of the form:
1665
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001666 { # Represents an Operation resource.
1667 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001668 # Google Compute Engine has three Operation resources:
1669 #
1670 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1671 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001672 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1673 #
1674 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001675 # - For global operations, use the `globalOperations` resource.
1676 # - For regional operations, use the `regionOperations` resource.
1677 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001678 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001679 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001680 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001681 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001682 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001683 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001684 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001685 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001686 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1687 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001688 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001689 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001690 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001691 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001692 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1693 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1694 {
1695 "message": "A String", # [Output Only] A human-readable description of the warning code.
1696 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1697 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1698 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1699 {
1700 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1701 "key": "A String", # [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).
1702 },
1703 ],
1704 },
1705 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001706 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001707 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001708 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1709 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001710 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001711 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1712 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1713 {
1714 "message": "A String", # [Output Only] An optional, human-readable error message.
1715 "code": "A String", # [Output Only] The error type identifier for this error.
1716 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1717 },
1718 ],
1719 },
1720 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1721 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001722 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001723 }</pre>
1724</div>
1725
1726<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001727 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</code>
1728 <pre>Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
1729
1730Args:
1731 project: string, Project ID for this request. (required)
1732 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
1733 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1734 body: object, The request body.
1735 The object takes the form of:
1736
1737{ # RegionInstanceGroupManagers.patchPerInstanceConfigs
1738 "perInstanceConfigs": [ # The list of per-instance configs to insert or patch on this managed instance group.
1739 {
1740 "name": "A String", # 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't exist or is not part of the group will result in an error.
1741 "preservedState": { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
1742 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1743 "a_key": {
1744 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
1745 "mode": "A String", # 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.
1746 "autoDelete": "A String", # 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.
1747 },
1748 },
1749 "metadata": { # Preserved metadata defined for this instance.
1750 "a_key": "A String",
1751 },
1752 },
1753 "fingerprint": "A String", # 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.
1754 },
1755 ],
1756 }
1757
1758 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.
1759
1760For 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.
1761
1762The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1763
1764Returns:
1765 An object of the form:
1766
1767 { # Represents an Operation resource.
1768 #
1769 # Google Compute Engine has three Operation resources:
1770 #
1771 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1772 #
1773 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1774 #
1775 # Operations can be global, regional or zonal.
1776 # - For global operations, use the `globalOperations` resource.
1777 # - For regional operations, use the `regionOperations` resource.
1778 # - For zonal operations, use the `zonalOperations` resource.
1779 #
1780 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1781 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1782 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1783 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1784 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1785 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1786 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1787 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1788 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1789 "progress": 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.
1790 "httpErrorStatusCode": 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.
1791 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1792 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1793 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1794 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1795 {
1796 "message": "A String", # [Output Only] A human-readable description of the warning code.
1797 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1798 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1799 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1800 {
1801 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1802 "key": "A String", # [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).
1803 },
1804 ],
1805 },
1806 ],
1807 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
1808 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1809 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1810 "name": "A String", # [Output Only] Name of the operation.
1811 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1812 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1813 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1814 {
1815 "message": "A String", # [Output Only] An optional, human-readable error message.
1816 "code": "A String", # [Output Only] The error type identifier for this error.
1817 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1818 },
1819 ],
1820 },
1821 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1822 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1823 "targetLink": "A String", # [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.
1824 }</pre>
1825</div>
1826
1827<div class="method">
1828 <code class="details" id="recreateInstances">recreateInstances(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001829 <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 -07001830
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001831If 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.
1832
1833You can specify a maximum of 1000 instances with this method per request.
1834
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001835Args:
1836 project: string, Project ID for this request. (required)
1837 region: string, Name of the region scoping this request. (required)
1838 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001839 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001840 The object takes the form of:
1841
1842{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001843 "instances": [ # 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].
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001844 "A String",
1845 ],
1846 }
1847
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001848 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.
1849
1850For 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.
1851
1852The 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 -07001853
1854Returns:
1855 An object of the form:
1856
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 { # Represents an Operation resource.
1858 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001859 # Google Compute Engine has three Operation resources:
1860 #
1861 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1862 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001863 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1864 #
1865 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001866 # - For global operations, use the `globalOperations` resource.
1867 # - For regional operations, use the `regionOperations` resource.
1868 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001869 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001870 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001871 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001872 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001873 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001874 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001875 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001876 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001877 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1878 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001879 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001880 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001881 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001882 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001883 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1884 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1885 {
1886 "message": "A String", # [Output Only] A human-readable description of the warning code.
1887 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1888 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1889 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1890 {
1891 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1892 "key": "A String", # [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).
1893 },
1894 ],
1895 },
1896 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001897 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001898 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001899 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1900 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001901 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001902 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1903 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1904 {
1905 "message": "A String", # [Output Only] An optional, human-readable error message.
1906 "code": "A String", # [Output Only] The error type identifier for this error.
1907 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1908 },
1909 ],
1910 },
1911 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1912 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001913 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001914 }</pre>
1915</div>
1916
1917<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001918 <code class="details" id="resize">resize(project, region, instanceGroupManager, size, requestId=None)</code>
1919 <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.
1920
1921The 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 -07001922
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001923If 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.
1924
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001925Args:
1926 project: string, Project ID for this request. (required)
1927 region: string, Name of the region scoping this request. (required)
1928 instanceGroupManager: string, Name of the managed instance group. (required)
1929 size: integer, Number of instances that should exist in this instance group manager. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 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.
1931
1932For 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.
1933
1934The 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 -07001935
1936Returns:
1937 An object of the form:
1938
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001939 { # Represents an Operation resource.
1940 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001941 # Google Compute Engine has three Operation resources:
1942 #
1943 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1944 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001945 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1946 #
1947 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001948 # - For global operations, use the `globalOperations` resource.
1949 # - For regional operations, use the `regionOperations` resource.
1950 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001951 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001952 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001953 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001954 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001955 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001956 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001958 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001959 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1960 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001961 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001962 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001963 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001964 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001965 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1966 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1967 {
1968 "message": "A String", # [Output Only] A human-readable description of the warning code.
1969 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1970 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1971 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1972 {
1973 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1974 "key": "A String", # [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).
1975 },
1976 ],
1977 },
1978 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001979 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001980 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001981 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1982 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001983 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001984 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1985 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1986 {
1987 "message": "A String", # [Output Only] An optional, human-readable error message.
1988 "code": "A String", # [Output Only] The error type identifier for this error.
1989 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1990 },
1991 ],
1992 },
1993 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1994 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001995 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001996 }</pre>
1997</div>
1998
1999<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002000 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002001 <pre>Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002002
2003Args:
2004 project: string, Project ID for this request. (required)
2005 region: string, Name of the region scoping this request. (required)
2006 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002007 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002008 The object takes the form of:
2009
2010{
2011 "autoHealingPolicies": [
2012 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002013 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002014 "initialDelaySec": 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].
2015 },
2016 ],
2017 }
2018
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002019 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.
2020
2021For 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.
2022
2023The 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 -07002024
2025Returns:
2026 An object of the form:
2027
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002028 { # Represents an Operation resource.
2029 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002030 # Google Compute Engine has three Operation resources:
2031 #
2032 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2033 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002034 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2035 #
2036 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002037 # - For global operations, use the `globalOperations` resource.
2038 # - For regional operations, use the `regionOperations` resource.
2039 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002040 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002041 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002042 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002043 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002044 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002045 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002046 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002047 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002048 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2049 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002050 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002051 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002052 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002053 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002054 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2055 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2056 {
2057 "message": "A String", # [Output Only] A human-readable description of the warning code.
2058 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2059 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2060 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2061 {
2062 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2063 "key": "A String", # [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).
2064 },
2065 ],
2066 },
2067 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002068 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002069 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002070 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2071 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002072 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002073 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2074 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2075 {
2076 "message": "A String", # [Output Only] An optional, human-readable error message.
2077 "code": "A String", # [Output Only] The error type identifier for this error.
2078 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2079 },
2080 ],
2081 },
2082 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2083 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002084 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002085 }</pre>
2086</div>
2087
2088<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002089 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002090 <pre>Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
2091
2092Args:
2093 project: string, Project ID for this request. (required)
2094 region: string, Name of the region scoping this request. (required)
2095 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002096 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002097 The object takes the form of:
2098
2099{
2100 "instanceTemplate": "A String", # URL of the InstanceTemplate resource from which all new instances will be created.
2101 }
2102
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002103 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.
2104
2105For 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.
2106
2107The 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 -07002108
2109Returns:
2110 An object of the form:
2111
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002112 { # Represents an Operation resource.
2113 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002114 # Google Compute Engine has three Operation resources:
2115 #
2116 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2117 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002118 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2119 #
2120 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002121 # - For global operations, use the `globalOperations` resource.
2122 # - For regional operations, use the `regionOperations` resource.
2123 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002124 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002125 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002126 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002127 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002128 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002129 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002130 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002131 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002132 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2133 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002134 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002135 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002136 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002137 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002138 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2139 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2140 {
2141 "message": "A String", # [Output Only] A human-readable description of the warning code.
2142 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2143 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2144 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2145 {
2146 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2147 "key": "A String", # [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).
2148 },
2149 ],
2150 },
2151 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002152 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002153 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002154 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2155 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002156 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002157 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2158 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2159 {
2160 "message": "A String", # [Output Only] An optional, human-readable error message.
2161 "code": "A String", # [Output Only] The error type identifier for this error.
2162 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2163 },
2164 ],
2165 },
2166 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2167 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002168 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002169 }</pre>
2170</div>
2171
2172<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002173 <code class="details" id="setTargetPools">setTargetPools(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002174 <pre>Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
2175
2176Args:
2177 project: string, Project ID for this request. (required)
2178 region: string, Name of the region scoping this request. (required)
2179 instanceGroupManager: string, Name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002180 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002181 The object takes the form of:
2182
2183{
2184 "targetPools": [ # 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.
2185 "A String",
2186 ],
2187 "fingerprint": "A String", # 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.
2188 }
2189
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002190 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.
2191
2192For 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.
2193
2194The 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 -07002195
2196Returns:
2197 An object of the form:
2198
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002199 { # Represents an Operation resource.
2200 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002201 # Google Compute Engine has three Operation resources:
2202 #
2203 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2204 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002205 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2206 #
2207 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002208 # - For global operations, use the `globalOperations` resource.
2209 # - For regional operations, use the `regionOperations` resource.
2210 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002211 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002212 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002213 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002215 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002216 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002217 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002218 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002219 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2220 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002221 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002222 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002223 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002224 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002225 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2226 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2227 {
2228 "message": "A String", # [Output Only] A human-readable description of the warning code.
2229 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2230 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2231 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2232 {
2233 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2234 "key": "A String", # [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).
2235 },
2236 ],
2237 },
2238 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002239 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002240 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002241 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2242 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002243 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002244 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2245 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2246 {
2247 "message": "A String", # [Output Only] An optional, human-readable error message.
2248 "code": "A String", # [Output Only] The error type identifier for this error.
2249 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2250 },
2251 ],
2252 },
2253 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2254 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002255 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002256 }</pre>
2257</div>
2258
2259<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002260 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002261 <pre>Returns permissions that a caller has on the specified resource.
2262
2263Args:
2264 project: string, Project ID for this request. (required)
2265 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002266 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002267 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002268 The object takes the form of:
2269
2270{
2271 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
2272 "A String",
2273 ],
2274 }
2275
2276
2277Returns:
2278 An object of the form:
2279
2280 {
2281 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2282 "A String",
2283 ],
2284 }</pre>
2285</div>
2286
2287<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002288 <code class="details" id="update">update(project, region, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002289 <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.
2290
2291Args:
2292 project: string, Project ID for this request. (required)
2293 region: string, Name of the region scoping this request. (required)
2294 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002295 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002296 The object takes the form of:
2297
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002298{ # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002299 #
2300 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2301 #
2302 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2303 #
2304 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
2305 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
2306 "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
2307 "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
2308 "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
2309 "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
2310 "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
2311 },
2312 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2313 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2314 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
2315 "serviceAccount": "A String", # 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.
2316 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2317 "baseInstanceName": "A String", # 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.
2318 "updatePolicy": { # The update policy for this managed instance group.
2319 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
2320 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
2321 #
2322 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2323 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002324 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002325 #
2326 # - If the value is fixed, then the calculated value is equal to the fixed value.
2327 # - 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.
2328 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2329 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2330 },
2331 "minimalAction": "A String", # 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.
2332 "instanceRedistributionType": "A String", # The instance redistribution policy for regional managed instance groups. Valid values are:
2333 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
2334 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
2335 "maxUnavailable": { # 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:
2336 #
2337 #
2338 # - The instance's status is RUNNING.
2339 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
2340 #
2341 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2342 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2343 #
2344 #
2345 # - If the value is fixed, then the calculated value is equal to the fixed value.
2346 # - 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.
2347 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2348 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2349 },
2350 "type": "A String", # 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).
2351 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
2352 },
2353 "targetPools": [ # 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.
2354 "A String",
2355 ],
2356 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2357 { # The named port. For example: .
2358 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
2359 "port": 42, # The port number, which can be a value between 1 and 65535.
2360 },
2361 ],
2362 "status": { # [Output Only] The status of this managed instance group.
2363 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
2364 "isStateful": 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.
2365 "hasStatefulConfig": 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.
2366 },
2367 "isStable": 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.
2368 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
2369 "isReached": 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' target version are specified by version field on Instance Group Manager.
2370 },
2371 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager.
2372 },
2373 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2374 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
2375 {
2376 "healthCheck": "A String", # The URL for the health check that signals autohealing.
2377 "initialDelaySec": 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].
2378 },
2379 ],
2380 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
2381 "targetSize": 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.
2382 "instanceTemplate": "A String", # 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.
2383 "fingerprint": "A String", # 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.
2384 #
2385 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2386 "currentActions": { # [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.
2387 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2388 "recreating": 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.
2389 "creating": 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.
2390 #
2391 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
2392 "verifying": 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.
2393 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
2394 "abandoning": 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.
2395 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
2396 "creatingWithoutRetries": 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's targetSize value accordingly.
2397 "refreshing": 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.
2398 },
2399 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
2400 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
2401 #
2402 # 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.
2403 {
2404 "targetSize": { # 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:
2405 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2406 # - 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 Kim715bd7f2019-06-14 16:50:42 -07002407 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2408 #
2409 #
2410 # - If the value is fixed, then the calculated value is equal to the fixed value.
2411 # - 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.
2412 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2413 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2414 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002415 "instanceTemplate": "A String", # 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.
2416 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002417 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002418 ],
2419 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2420 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
2421 "zones": [ # Zones where the regional managed instance group will create and manage instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002422 {
Dan O'Mearadd494642020-05-01 07:42:23 -07002423 "zone": "A String", # 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 -07002424 },
2425 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002426 },
2427 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
2428 "preservedState": { # Configuration of preserved resources.
2429 "disks": { # 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.
2430 "a_key": {
2431 "autoDelete": "A String", # 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 -07002432 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002433 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002434 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002435 },
2436 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
2437}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002438
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002439 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.
2440
2441For 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.
2442
2443The 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 -07002444
2445Returns:
2446 An object of the form:
2447
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002448 { # Represents an Operation resource.
2449 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002450 # Google Compute Engine has three Operation resources:
2451 #
2452 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2453 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002454 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2455 #
2456 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002457 # - For global operations, use the `globalOperations` resource.
2458 # - For regional operations, use the `regionOperations` resource.
2459 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002460 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002461 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002462 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002463 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002464 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002465 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002466 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002467 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002468 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2469 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002470 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002471 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002472 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002473 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002474 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2475 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2476 {
2477 "message": "A String", # [Output Only] A human-readable description of the warning code.
2478 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2479 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2480 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2481 {
2482 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2483 "key": "A String", # [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).
2484 },
2485 ],
2486 },
2487 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002488 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002489 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002490 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2491 "name": "A String", # [Output Only] Name of the operation.
2492 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2493 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2494 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2495 {
2496 "message": "A String", # [Output Only] An optional, human-readable error message.
2497 "code": "A String", # [Output Only] The error type identifier for this error.
2498 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2499 },
2500 ],
2501 },
2502 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2503 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2504 "targetLink": "A String", # [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.
2505 }</pre>
2506</div>
2507
2508<div class="method">
2509 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, region, instanceGroupManager, body=None, requestId=None)</code>
2510 <pre>Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
2511
2512Args:
2513 project: string, Project ID for this request. (required)
2514 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
2515 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2516 body: object, The request body.
2517 The object takes the form of:
2518
2519{ # RegionInstanceGroupManagers.updatePerInstanceConfigs
2520 "perInstanceConfigs": [ # The list of per-instance configs to insert or patch on this managed instance group.
2521 {
2522 "name": "A String", # 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't exist or is not part of the group will result in an error.
2523 "preservedState": { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
2524 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2525 "a_key": {
2526 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
2527 "mode": "A String", # 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.
2528 "autoDelete": "A String", # 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.
2529 },
2530 },
2531 "metadata": { # Preserved metadata defined for this instance.
2532 "a_key": "A String",
2533 },
2534 },
2535 "fingerprint": "A String", # 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.
2536 },
2537 ],
2538 }
2539
2540 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.
2541
2542For 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.
2543
2544The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2545
2546Returns:
2547 An object of the form:
2548
2549 { # Represents an Operation resource.
2550 #
2551 # Google Compute Engine has three Operation resources:
2552 #
2553 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2554 #
2555 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2556 #
2557 # Operations can be global, regional or zonal.
2558 # - For global operations, use the `globalOperations` resource.
2559 # - For regional operations, use the `regionOperations` resource.
2560 # - For zonal operations, use the `zonalOperations` resource.
2561 #
2562 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2563 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2564 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2565 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2566 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2567 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2568 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2569 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2570 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2571 "progress": 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.
2572 "httpErrorStatusCode": 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.
2573 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2574 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2575 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2576 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2577 {
2578 "message": "A String", # [Output Only] A human-readable description of the warning code.
2579 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2580 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2581 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2582 {
2583 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2584 "key": "A String", # [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).
2585 },
2586 ],
2587 },
2588 ],
2589 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
2590 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2591 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2592 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002593 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002594 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2595 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2596 {
2597 "message": "A String", # [Output Only] An optional, human-readable error message.
2598 "code": "A String", # [Output Only] The error type identifier for this error.
2599 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2600 },
2601 ],
2602 },
2603 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2604 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002605 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002606 }</pre>
2607</div>
2608
2609</body></html>