blob: b043b2d71a4eb3fe4d52376fbb9f2314616b7810 [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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#abandonInstances">abandonInstances(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
79<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#applyUpdatesToInstances">applyUpdatesToInstances(project, region, instanceGroupManager, body)</a></code></p>
82<p class="firstline">Apply updates to selected instances the managed instance group.</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(project, region, instanceGroupManager, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified managed instance group and all of the instances in that group.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#deleteInstances">deleteInstances(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
88<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 -070089<p class="toc_element">
90 <code><a href="#get">get(project, region, instanceGroupManager)</a></code></p>
91<p class="firstline">Returns all of the details about the specified managed instance group.</p>
92<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#insert">insert(project, region, body, requestId=None)</a></code></p>
94<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 -070095<p class="toc_element">
96 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Retrieves the list of managed instance groups that are contained within the specified region.</p>
98<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080099 <code><a href="#listManagedInstances">listManagedInstances(project, region, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<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>
101<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400102 <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 <code><a href="#patch">patch(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
109<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 -0700110<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 <code><a href="#recreateInstances">recreateInstances(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
112<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 -0700113<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#resize">resize(project, region, instanceGroupManager, size, requestId=None)</a></code></p>
115<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 -0700116<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
118<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 -0700119<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700121<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>
122<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 <code><a href="#setTargetPools">setTargetPools(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124<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>
125<p class="toc_element">
126 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
127<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
128<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 <code><a href="#update">update(project, region, instanceGroupManager, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is 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>
131<h3>Method Details</h3>
132<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 <code class="details" id="abandonInstances">abandonInstances(project, region, instanceGroupManager, body, requestId=None)</code>
134 <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 -0700135
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400136If 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.
137
138You can specify a maximum of 1000 instances with this method per request.
139
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700140Args:
141 project: string, Project ID for this request. (required)
142 region: string, Name of the region scoping this request. (required)
143 instanceGroupManager: string, Name of the managed instance group. (required)
144 body: object, The request body. (required)
145 The object takes the form of:
146
147{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400148 "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 -0700149 "A String",
150 ],
151 }
152
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 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.
154
155For 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.
156
157The 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 -0700158
159Returns:
160 An object of the form:
161
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162 { # Represents an Operation resource.
163 #
164 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
165 #
166 # Operations can be global, regional or zonal.
167 # - For global operations, use the globalOperations resource.
168 # - For regional operations, use the regionOperations resource.
169 # - For zonal operations, use the zonalOperations resource.
170 #
171 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172 "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 -0700173 "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 -0400174 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700175 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 "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 -0700177 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
178 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
179 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
180 "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.
181 "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.
182 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
183 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
184 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
185 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
186 {
187 "message": "A String", # [Output Only] A human-readable description of the warning code.
188 "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.
189 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
190 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
191 {
192 "value": "A String", # [Output Only] A warning data value corresponding to the key.
193 "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).
194 },
195 ],
196 },
197 ],
198 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
199 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
200 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
201 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202 "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 -0700203 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
204 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
205 {
206 "message": "A String", # [Output Only] An optional, human-readable error message.
207 "code": "A String", # [Output Only] The error type identifier for this error.
208 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
209 },
210 ],
211 },
212 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
213 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800214 "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 -0700215 }</pre>
216</div>
217
218<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, region, instanceGroupManager, body)</code>
220 <pre>Apply updates to selected instances the managed instance group.
221
222Args:
223 project: string, Project ID for this request. (required)
224 region: string, Name of the region scoping this request, should conform to RFC1035. (required)
225 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
226 body: object, The request body. (required)
227 The object takes the form of:
228
229{ # InstanceGroupManagers.applyUpdatesToInstances
230 "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].
231 "A String",
232 ],
233 "mostDisruptiveAllowedAction": "A String", # The most disruptive action that you want to perform on each instance during the update:
234 # - REPLACE: Delete the instance and create it again.
235 # - RESTART: Stop the instance and start it again.
236 # - REFRESH: Do not stop the instance.
237 # - 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.
238 "minimalAction": "A String", # The minimal action that you want to perform on each instance during the update:
239 # - REPLACE: At minimum, delete the instance and create it again.
240 # - RESTART: Stop the instance and start it again.
241 # - REFRESH: Do not stop the instance.
242 # - 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.
243 }
244
245
246Returns:
247 An object of the form:
248
249 { # Represents an Operation resource.
250 #
251 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
252 #
253 # Operations can be global, regional or zonal.
254 # - For global operations, use the globalOperations resource.
255 # - For regional operations, use the regionOperations resource.
256 # - For zonal operations, use the zonalOperations resource.
257 #
258 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
259 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
260 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
261 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
262 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
263 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
264 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
265 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
266 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
267 "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.
268 "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.
269 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
270 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
271 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
272 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
273 {
274 "message": "A String", # [Output Only] A human-readable description of the warning code.
275 "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.
276 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
277 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
278 {
279 "value": "A String", # [Output Only] A warning data value corresponding to the key.
280 "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).
281 },
282 ],
283 },
284 ],
285 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
286 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
287 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
288 "name": "A String", # [Output Only] Name of the resource.
289 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
290 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
291 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
292 {
293 "message": "A String", # [Output Only] An optional, human-readable error message.
294 "code": "A String", # [Output Only] The error type identifier for this error.
295 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
296 },
297 ],
298 },
299 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
300 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
301 "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.
302 }</pre>
303</div>
304
305<div class="method">
306 <code class="details" id="delete">delete(project, region, instanceGroupManager, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700307 <pre>Deletes the specified managed instance group and all of the instances in that group.
308
309Args:
310 project: string, Project ID for this request. (required)
311 region: string, Name of the region scoping this request. (required)
312 instanceGroupManager: string, Name of the managed instance group to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 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.
314
315For 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.
316
317The 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 -0700318
319Returns:
320 An object of the form:
321
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 { # Represents an Operation resource.
323 #
324 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
325 #
326 # Operations can be global, regional or zonal.
327 # - For global operations, use the globalOperations resource.
328 # - For regional operations, use the regionOperations resource.
329 # - For zonal operations, use the zonalOperations resource.
330 #
331 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700332 "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 -0700333 "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 -0400334 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700335 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 "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 -0700337 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
338 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
339 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
340 "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.
341 "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.
342 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
343 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
344 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
345 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
346 {
347 "message": "A String", # [Output Only] A human-readable description of the warning code.
348 "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.
349 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
350 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
351 {
352 "value": "A String", # [Output Only] A warning data value corresponding to the key.
353 "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).
354 },
355 ],
356 },
357 ],
358 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
359 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
360 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
361 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700362 "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 -0700363 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
364 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
365 {
366 "message": "A String", # [Output Only] An optional, human-readable error message.
367 "code": "A String", # [Output Only] The error type identifier for this error.
368 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
369 },
370 ],
371 },
372 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
373 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800374 "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 -0700375 }</pre>
376</div>
377
378<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 <code class="details" id="deleteInstances">deleteInstances(project, region, instanceGroupManager, body, requestId=None)</code>
380 <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 -0700381
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400382If 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.
383
384You can specify a maximum of 1000 instances with this method per request.
385
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700386Args:
387 project: string, Project ID for this request. (required)
388 region: string, Name of the region scoping this request. (required)
389 instanceGroupManager: string, Name of the managed instance group. (required)
390 body: object, The request body. (required)
391 The object takes the form of:
392
393{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400394 "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 -0700395 "A String",
396 ],
397 }
398
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700399 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.
400
401For 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.
402
403The 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 -0700404
405Returns:
406 An object of the form:
407
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 { # Represents an Operation resource.
409 #
410 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
411 #
412 # Operations can be global, regional or zonal.
413 # - For global operations, use the globalOperations resource.
414 # - For regional operations, use the regionOperations resource.
415 # - For zonal operations, use the zonalOperations resource.
416 #
417 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700418 "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 -0700419 "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 -0400420 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700421 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 "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 -0700423 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
424 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
425 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
426 "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.
427 "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.
428 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
429 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
430 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
431 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
432 {
433 "message": "A String", # [Output Only] A human-readable description of the warning code.
434 "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.
435 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
436 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
437 {
438 "value": "A String", # [Output Only] A warning data value corresponding to the key.
439 "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).
440 },
441 ],
442 },
443 ],
444 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
445 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
446 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
447 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 "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 -0700449 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
450 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
451 {
452 "message": "A String", # [Output Only] An optional, human-readable error message.
453 "code": "A String", # [Output Only] The error type identifier for this error.
454 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
455 },
456 ],
457 },
458 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
459 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800460 "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 -0700461 }</pre>
462</div>
463
464<div class="method">
465 <code class="details" id="get">get(project, region, instanceGroupManager)</code>
466 <pre>Returns all of the details about the specified managed instance group.
467
468Args:
469 project: string, Project ID for this request. (required)
470 region: string, Name of the region scoping this request. (required)
471 instanceGroupManager: string, Name of the managed instance group to return. (required)
472
473Returns:
474 An object of the form:
475
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476 { # Represents a Managed Instance Group resource.
477 #
478 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
479 #
480 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
481 #
482 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700483 "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 -0700484 "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.
485 "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.
486 "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.
487 "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.
488 "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.
489 },
490 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700491 "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 -0700492 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
493 "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.
494 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
495 "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.
496 "updatePolicy": { # The update policy for this managed instance group.
497 "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.
498 #
499 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
500 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
501 #
502 #
503 # - If the value is fixed, then the calculated value is equal to the fixed value.
504 # - 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.
505 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
506 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
507 },
508 "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.
509 "instanceRedistributionType": "A String",
510 "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:
511 #
512 #
513 # - The instance's status is RUNNING.
514 # - 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.
515 #
516 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
517 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
518 #
519 #
520 # - If the value is fixed, then the calculated value is equal to the fixed value.
521 # - 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.
522 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
523 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
524 },
525 "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).
526 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
527 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700528 "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.
529 "A String",
530 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700531 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
532 { # The named port. For example: .
533 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
534 "port": 42, # The port number, which can be a value between 1 and 65535.
535 },
536 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 "status": { # [Output Only] The status of this managed instance group.
538 "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.
539 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
540 "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.
541 },
542 },
543 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
544 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
545 {
546 "healthCheck": "A String", # The URL for the health check that signals autohealing.
547 "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].
548 },
549 ],
550 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
551 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
552 "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.
553 "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.
554 #
555 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
556 "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.
557 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
558 "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.
559 "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.
560 #
561 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
562 "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.
563 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
564 "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.
565 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
566 "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.
567 "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.
568 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700569 "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 -0700570 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
571 #
572 # 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.
573 {
574 "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:
575 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
576 # - 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.
577 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
578 #
579 #
580 # - If the value is fixed, then the calculated value is equal to the fixed value.
581 # - 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.
582 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
583 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
584 },
585 "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.
586 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
587 },
588 ],
589 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
590 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
591 "zones": [ # Zones where the regional managed instance group will create and manage instances.
592 {
593 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
594 },
595 ],
596 },
597 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700598 }</pre>
599</div>
600
601<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 <code class="details" id="insert">insert(project, region, body, requestId=None)</code>
603 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700604
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400605A regional managed instance group can contain up to 2000 instances.
606
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700607Args:
608 project: string, Project ID for this request. (required)
609 region: string, Name of the region scoping this request. (required)
610 body: object, The request body. (required)
611 The object takes the form of:
612
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613{ # Represents a Managed Instance Group resource.
614 #
615 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
616 #
617 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
618 #
619 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700620 "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 -0700621 "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.
622 "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.
623 "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.
624 "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.
625 "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.
626 },
627 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700628 "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 -0700629 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
630 "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.
631 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
632 "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.
633 "updatePolicy": { # The update policy for this managed instance group.
634 "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.
635 #
636 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
637 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
638 #
639 #
640 # - If the value is fixed, then the calculated value is equal to the fixed value.
641 # - 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.
642 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
643 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
644 },
645 "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.
646 "instanceRedistributionType": "A String",
647 "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:
648 #
649 #
650 # - The instance's status is RUNNING.
651 # - 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.
652 #
653 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
654 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
655 #
656 #
657 # - If the value is fixed, then the calculated value is equal to the fixed value.
658 # - 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.
659 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
660 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
661 },
662 "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).
663 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
664 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700665 "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.
666 "A String",
667 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700668 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
669 { # The named port. For example: .
670 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
671 "port": 42, # The port number, which can be a value between 1 and 65535.
672 },
673 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 "status": { # [Output Only] The status of this managed instance group.
675 "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.
676 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
677 "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.
678 },
679 },
680 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
681 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
682 {
683 "healthCheck": "A String", # The URL for the health check that signals autohealing.
684 "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].
685 },
686 ],
687 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
688 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
689 "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.
690 "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.
691 #
692 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
693 "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.
694 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
695 "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.
696 "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.
697 #
698 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
699 "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.
700 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
701 "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.
702 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
703 "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.
704 "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.
705 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700706 "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 -0700707 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
708 #
709 # 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.
710 {
711 "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:
712 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
713 # - 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.
714 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
715 #
716 #
717 # - If the value is fixed, then the calculated value is equal to the fixed value.
718 # - 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.
719 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
720 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
721 },
722 "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.
723 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
724 },
725 ],
726 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
727 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
728 "zones": [ # Zones where the regional managed instance group will create and manage instances.
729 {
730 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
731 },
732 ],
733 },
734 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700735 }
736
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 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.
738
739For 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.
740
741The 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 -0700742
743Returns:
744 An object of the form:
745
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 { # Represents an Operation resource.
747 #
748 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
749 #
750 # Operations can be global, regional or zonal.
751 # - For global operations, use the globalOperations resource.
752 # - For regional operations, use the regionOperations resource.
753 # - For zonal operations, use the zonalOperations resource.
754 #
755 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700756 "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 -0700757 "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 -0400758 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700759 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 "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 -0700761 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
762 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
763 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
764 "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.
765 "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.
766 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
767 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
768 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
769 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
770 {
771 "message": "A String", # [Output Only] A human-readable description of the warning code.
772 "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.
773 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
774 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
775 {
776 "value": "A String", # [Output Only] A warning data value corresponding to the key.
777 "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).
778 },
779 ],
780 },
781 ],
782 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
783 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
784 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
785 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 "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 -0700787 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
788 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
789 {
790 "message": "A String", # [Output Only] An optional, human-readable error message.
791 "code": "A String", # [Output Only] The error type identifier for this error.
792 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
793 },
794 ],
795 },
796 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
797 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800798 "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 -0700799 }</pre>
800</div>
801
802<div class="method">
803 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
804 <pre>Retrieves the list of managed instance groups that are contained within the specified region.
805
806Args:
807 project: string, Project ID for this request. (required)
808 region: string, Name of the region scoping this request. (required)
809 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
810
811You 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.
812
813Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400814 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)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700815 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700816 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 =, !=, >, or <.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700817
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700818For 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 -0700819
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820You 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 -0700821
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822To 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 -0700823
824Returns:
825 An object of the form:
826
827 { # Contains a list of managed instance groups.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 "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.
829 "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.
830 "items": [ # A list of InstanceGroupManager resources.
831 { # Represents a Managed Instance Group resource.
832 #
833 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
834 #
835 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
836 #
837 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700838 "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 -0700839 "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.
840 "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.
841 "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.
842 "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.
843 "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.
844 },
845 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700846 "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 -0700847 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
848 "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.
849 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
850 "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.
851 "updatePolicy": { # The update policy for this managed instance group.
852 "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.
853 #
854 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
855 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
856 #
857 #
858 # - If the value is fixed, then the calculated value is equal to the fixed value.
859 # - 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.
860 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
861 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
862 },
863 "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.
864 "instanceRedistributionType": "A String",
865 "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:
866 #
867 #
868 # - The instance's status is RUNNING.
869 # - 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.
870 #
871 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
872 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
873 #
874 #
875 # - If the value is fixed, then the calculated value is equal to the fixed value.
876 # - 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.
877 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
878 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
879 },
880 "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).
881 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
882 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700883 "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.
884 "A String",
885 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700886 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
887 { # The named port. For example: .
888 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
889 "port": 42, # The port number, which can be a value between 1 and 65535.
890 },
891 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700892 "status": { # [Output Only] The status of this managed instance group.
893 "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.
894 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
895 "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.
896 },
897 },
898 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
899 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
900 {
901 "healthCheck": "A String", # The URL for the health check that signals autohealing.
902 "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].
903 },
904 ],
905 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
906 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
907 "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.
908 "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.
909 #
910 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
911 "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.
912 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
913 "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.
914 "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.
915 #
916 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
917 "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.
918 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
919 "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.
920 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
921 "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.
922 "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.
923 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700924 "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 -0700925 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
926 #
927 # 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.
928 {
929 "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:
930 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
931 # - 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.
932 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
933 #
934 #
935 # - If the value is fixed, then the calculated value is equal to the fixed value.
936 # - 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.
937 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
938 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
939 },
940 "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.
941 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
942 },
943 ],
944 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
945 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
946 "zones": [ # Zones where the regional managed instance group will create and manage instances.
947 {
948 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
949 },
950 ],
951 },
952 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700953 },
954 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 "warning": { # [Output Only] Informational warning message.
956 "message": "A String", # [Output Only] A human-readable description of the warning code.
957 "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.
958 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
959 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
960 {
961 "value": "A String", # [Output Only] A warning data value corresponding to the key.
962 "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).
963 },
964 ],
965 },
966 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
967 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700968 }</pre>
969</div>
970
971<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800972 <code class="details" id="listManagedInstances">listManagedInstances(project, region, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700973 <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.
974
975Args:
976 project: string, Project ID for this request. (required)
977 region: string, Name of the region scoping this request. (required)
978 instanceGroupManager: string, The name of the managed instance group. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 order_by: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
980
981You 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.
982
983Currently, only sorting by name or creationTimestamp desc is supported.
984 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)
985 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.
986 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 =, !=, >, or <.
987
988For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
989
990You 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.
991
992To 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 -0700993
994Returns:
995 An object of the form:
996
997 {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400998 "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 -0700999 "managedInstances": [ # A list of managed instances.
1000 { # A Managed Instance resource.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001001 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001002 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
1003 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1004 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1005 {
1006 "message": "A String", # [Output Only] An optional, human-readable error message.
1007 "code": "A String", # [Output Only] The error type identifier for this error.
1008 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1009 },
1010 ],
1011 },
1012 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001013 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
1014 "version": { # [Output Only] Intended version of this instance.
1015 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1016 "name": "A String", # [Output Only] Name of the version.
1017 },
1018 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1019 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1020 # - 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.
1021 # - 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.
1022 # - RECREATING The managed instance group is recreating this instance.
1023 # - DELETING The managed instance group is permanently deleting this instance.
1024 # - 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.
1025 # - RESTARTING The managed instance group is restarting the instance.
1026 # - 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 -07001027 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001028 "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 -07001029 },
1030 ],
1031 }</pre>
1032</div>
1033
1034<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001035 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1036 <pre>Retrieves the next page of results.
1037
1038Args:
1039 previous_request: The request for the previous page. (required)
1040 previous_response: The response from the request for the previous page. (required)
1041
1042Returns:
1043 A request object that you can call 'execute()' on to request the next
1044 page. Returns None if there are no more items in the collection.
1045 </pre>
1046</div>
1047
1048<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001049 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1050 <pre>Retrieves the next page of results.
1051
1052Args:
1053 previous_request: The request for the previous page. (required)
1054 previous_response: The response from the request for the previous page. (required)
1055
1056Returns:
1057 A request object that you can call 'execute()' on to request the next
1058 page. Returns None if there are no more items in the collection.
1059 </pre>
1060</div>
1061
1062<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001063 <code class="details" id="patch">patch(project, region, instanceGroupManager, body, requestId=None)</code>
1064 <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 -07001065
1066Args:
1067 project: string, Project ID for this request. (required)
1068 region: string, Name of the region scoping this request. (required)
1069 instanceGroupManager: string, The name of the instance group manager. (required)
1070 body: object, The request body. (required)
1071 The object takes the form of:
1072
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001073{ # Represents a Managed Instance Group resource.
1074 #
1075 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1076 #
1077 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1078 #
1079 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001080 "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 -07001081 "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.
1082 "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.
1083 "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.
1084 "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.
1085 "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.
1086 },
1087 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001088 "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 -07001089 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1090 "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.
1091 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1092 "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.
1093 "updatePolicy": { # The update policy for this managed instance group.
1094 "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.
1095 #
1096 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1097 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1098 #
1099 #
1100 # - If the value is fixed, then the calculated value is equal to the fixed value.
1101 # - 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.
1102 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1103 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1104 },
1105 "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.
1106 "instanceRedistributionType": "A String",
1107 "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:
1108 #
1109 #
1110 # - The instance's status is RUNNING.
1111 # - 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.
1112 #
1113 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1114 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1115 #
1116 #
1117 # - If the value is fixed, then the calculated value is equal to the fixed value.
1118 # - 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.
1119 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1120 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1121 },
1122 "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).
1123 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1124 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001125 "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.
1126 "A String",
1127 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001128 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1129 { # The named port. For example: .
1130 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1131 "port": 42, # The port number, which can be a value between 1 and 65535.
1132 },
1133 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001134 "status": { # [Output Only] The status of this managed instance group.
1135 "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.
1136 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1137 "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.
1138 },
1139 },
1140 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1141 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1142 {
1143 "healthCheck": "A String", # The URL for the health check that signals autohealing.
1144 "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].
1145 },
1146 ],
1147 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1148 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
1149 "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.
1150 "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.
1151 #
1152 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1153 "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.
1154 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1155 "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.
1156 "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.
1157 #
1158 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1159 "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.
1160 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1161 "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.
1162 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1163 "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.
1164 "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.
1165 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001166 "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 -07001167 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1168 #
1169 # 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.
1170 {
1171 "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:
1172 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1173 # - 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.
1174 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1175 #
1176 #
1177 # - If the value is fixed, then the calculated value is equal to the fixed value.
1178 # - 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.
1179 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1180 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1181 },
1182 "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.
1183 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1184 },
1185 ],
1186 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1187 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1188 "zones": [ # Zones where the regional managed instance group will create and manage instances.
1189 {
1190 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1191 },
1192 ],
1193 },
1194 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001195 }
1196
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 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.
1198
1199For 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.
1200
1201The 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 -07001202
1203Returns:
1204 An object of the form:
1205
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001206 { # Represents an Operation resource.
1207 #
1208 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1209 #
1210 # Operations can be global, regional or zonal.
1211 # - For global operations, use the globalOperations resource.
1212 # - For regional operations, use the regionOperations resource.
1213 # - For zonal operations, use the zonalOperations resource.
1214 #
1215 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001216 "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 -07001217 "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 -04001218 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001219 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 "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 -07001221 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1222 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1223 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1224 "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.
1225 "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.
1226 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1227 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1228 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1229 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1230 {
1231 "message": "A String", # [Output Only] A human-readable description of the warning code.
1232 "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.
1233 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1234 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1235 {
1236 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1237 "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).
1238 },
1239 ],
1240 },
1241 ],
1242 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1243 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1244 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1245 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001246 "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 -07001247 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1248 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1249 {
1250 "message": "A String", # [Output Only] An optional, human-readable error message.
1251 "code": "A String", # [Output Only] The error type identifier for this error.
1252 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1253 },
1254 ],
1255 },
1256 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1257 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001258 "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 -07001259 }</pre>
1260</div>
1261
1262<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001263 <code class="details" id="recreateInstances">recreateInstances(project, region, instanceGroupManager, body, requestId=None)</code>
1264 <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 -07001265
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001266If 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.
1267
1268You can specify a maximum of 1000 instances with this method per request.
1269
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001270Args:
1271 project: string, Project ID for this request. (required)
1272 region: string, Name of the region scoping this request. (required)
1273 instanceGroupManager: string, Name of the managed instance group. (required)
1274 body: object, The request body. (required)
1275 The object takes the form of:
1276
1277{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001278 "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 -07001279 "A String",
1280 ],
1281 }
1282
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001283 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.
1284
1285For 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.
1286
1287The 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 -07001288
1289Returns:
1290 An object of the form:
1291
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 { # Represents an Operation resource.
1293 #
1294 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1295 #
1296 # Operations can be global, regional or zonal.
1297 # - For global operations, use the globalOperations resource.
1298 # - For regional operations, use the regionOperations resource.
1299 # - For zonal operations, use the zonalOperations resource.
1300 #
1301 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001302 "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 -07001303 "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 -04001304 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001305 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001306 "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 -07001307 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1308 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1309 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1310 "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.
1311 "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.
1312 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1313 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1314 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1315 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1316 {
1317 "message": "A String", # [Output Only] A human-readable description of the warning code.
1318 "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.
1319 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1320 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1321 {
1322 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1323 "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).
1324 },
1325 ],
1326 },
1327 ],
1328 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1329 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1330 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1331 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001332 "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 -07001333 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1334 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1335 {
1336 "message": "A String", # [Output Only] An optional, human-readable error message.
1337 "code": "A String", # [Output Only] The error type identifier for this error.
1338 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1339 },
1340 ],
1341 },
1342 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1343 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001344 "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 -07001345 }</pre>
1346</div>
1347
1348<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001349 <code class="details" id="resize">resize(project, region, instanceGroupManager, size, requestId=None)</code>
1350 <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.
1351
1352The 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 -07001353
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001354If 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.
1355
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001356Args:
1357 project: string, Project ID for this request. (required)
1358 region: string, Name of the region scoping this request. (required)
1359 instanceGroupManager: string, Name of the managed instance group. (required)
1360 size: integer, Number of instances that should exist in this instance group manager. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001361 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.
1362
1363For 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.
1364
1365The 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 -07001366
1367Returns:
1368 An object of the form:
1369
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001370 { # Represents an Operation resource.
1371 #
1372 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1373 #
1374 # Operations can be global, regional or zonal.
1375 # - For global operations, use the globalOperations resource.
1376 # - For regional operations, use the regionOperations resource.
1377 # - For zonal operations, use the zonalOperations resource.
1378 #
1379 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001380 "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 -07001381 "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 -04001382 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001383 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001384 "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 -07001385 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1386 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1387 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1388 "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.
1389 "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.
1390 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1391 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1392 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1393 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1394 {
1395 "message": "A String", # [Output Only] A human-readable description of the warning code.
1396 "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.
1397 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1398 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1399 {
1400 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1401 "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).
1402 },
1403 ],
1404 },
1405 ],
1406 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1407 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1408 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1409 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001410 "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 -07001411 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1412 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1413 {
1414 "message": "A String", # [Output Only] An optional, human-readable error message.
1415 "code": "A String", # [Output Only] The error type identifier for this error.
1416 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1417 },
1418 ],
1419 },
1420 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1421 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001422 "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 -07001423 }</pre>
1424</div>
1425
1426<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body, requestId=None)</code>
1428 <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 -07001429
1430Args:
1431 project: string, Project ID for this request. (required)
1432 region: string, Name of the region scoping this request. (required)
1433 instanceGroupManager: string, Name of the managed instance group. (required)
1434 body: object, The request body. (required)
1435 The object takes the form of:
1436
1437{
1438 "autoHealingPolicies": [
1439 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001440 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001441 "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].
1442 },
1443 ],
1444 }
1445
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 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.
1447
1448For 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.
1449
1450The 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 -07001451
1452Returns:
1453 An object of the form:
1454
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 { # Represents an Operation resource.
1456 #
1457 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1458 #
1459 # Operations can be global, regional or zonal.
1460 # - For global operations, use the globalOperations resource.
1461 # - For regional operations, use the regionOperations resource.
1462 # - For zonal operations, use the zonalOperations resource.
1463 #
1464 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001465 "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 -07001466 "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 -04001467 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001468 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001469 "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 -07001470 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1471 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1472 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1473 "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.
1474 "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.
1475 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1476 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1477 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1478 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1479 {
1480 "message": "A String", # [Output Only] A human-readable description of the warning code.
1481 "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.
1482 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1483 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1484 {
1485 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1486 "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).
1487 },
1488 ],
1489 },
1490 ],
1491 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1492 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1493 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1494 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001495 "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 -07001496 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1497 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1498 {
1499 "message": "A String", # [Output Only] An optional, human-readable error message.
1500 "code": "A String", # [Output Only] The error type identifier for this error.
1501 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1502 },
1503 ],
1504 },
1505 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1506 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001507 "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 -07001508 }</pre>
1509</div>
1510
1511<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001512 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001513 <pre>Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
1514
1515Args:
1516 project: string, Project ID for this request. (required)
1517 region: string, Name of the region scoping this request. (required)
1518 instanceGroupManager: string, The name of the managed instance group. (required)
1519 body: object, The request body. (required)
1520 The object takes the form of:
1521
1522{
1523 "instanceTemplate": "A String", # URL of the InstanceTemplate resource from which all new instances will be created.
1524 }
1525
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001526 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.
1527
1528For 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.
1529
1530The 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 -07001531
1532Returns:
1533 An object of the form:
1534
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001535 { # Represents an Operation resource.
1536 #
1537 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1538 #
1539 # Operations can be global, regional or zonal.
1540 # - For global operations, use the globalOperations resource.
1541 # - For regional operations, use the regionOperations resource.
1542 # - For zonal operations, use the zonalOperations resource.
1543 #
1544 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001545 "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 -07001546 "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 -04001547 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001548 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001549 "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 -07001550 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1551 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1552 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1553 "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.
1554 "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.
1555 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1556 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1557 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1558 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1559 {
1560 "message": "A String", # [Output Only] A human-readable description of the warning code.
1561 "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.
1562 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1563 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1564 {
1565 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1566 "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).
1567 },
1568 ],
1569 },
1570 ],
1571 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1572 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1573 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1574 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 "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 -07001576 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1577 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1578 {
1579 "message": "A String", # [Output Only] An optional, human-readable error message.
1580 "code": "A String", # [Output Only] The error type identifier for this error.
1581 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1582 },
1583 ],
1584 },
1585 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1586 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001587 "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 -07001588 }</pre>
1589</div>
1590
1591<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001592 <code class="details" id="setTargetPools">setTargetPools(project, region, instanceGroupManager, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001593 <pre>Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
1594
1595Args:
1596 project: string, Project ID for this request. (required)
1597 region: string, Name of the region scoping this request. (required)
1598 instanceGroupManager: string, Name of the managed instance group. (required)
1599 body: object, The request body. (required)
1600 The object takes the form of:
1601
1602{
1603 "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.
1604 "A String",
1605 ],
1606 "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.
1607 }
1608
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001609 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.
1610
1611For 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.
1612
1613The 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 -07001614
1615Returns:
1616 An object of the form:
1617
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001618 { # Represents an Operation resource.
1619 #
1620 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1621 #
1622 # Operations can be global, regional or zonal.
1623 # - For global operations, use the globalOperations resource.
1624 # - For regional operations, use the regionOperations resource.
1625 # - For zonal operations, use the zonalOperations resource.
1626 #
1627 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001628 "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 -07001629 "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 -04001630 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001631 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001632 "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 -07001633 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1634 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1635 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1636 "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.
1637 "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.
1638 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1639 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1640 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1641 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1642 {
1643 "message": "A String", # [Output Only] A human-readable description of the warning code.
1644 "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.
1645 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1646 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1647 {
1648 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1649 "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).
1650 },
1651 ],
1652 },
1653 ],
1654 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1655 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1656 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1657 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001658 "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 -07001659 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1660 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1661 {
1662 "message": "A String", # [Output Only] An optional, human-readable error message.
1663 "code": "A String", # [Output Only] The error type identifier for this error.
1664 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1665 },
1666 ],
1667 },
1668 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1669 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001670 "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 -07001671 }</pre>
1672</div>
1673
1674<div class="method">
1675 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
1676 <pre>Returns permissions that a caller has on the specified resource.
1677
1678Args:
1679 project: string, Project ID for this request. (required)
1680 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001681 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001682 body: object, The request body. (required)
1683 The object takes the form of:
1684
1685{
1686 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1687 "A String",
1688 ],
1689 }
1690
1691
1692Returns:
1693 An object of the form:
1694
1695 {
1696 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1697 "A String",
1698 ],
1699 }</pre>
1700</div>
1701
1702<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001703 <code class="details" id="update">update(project, region, instanceGroupManager, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001704 <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.
1705
1706Args:
1707 project: string, Project ID for this request. (required)
1708 region: string, Name of the region scoping this request. (required)
1709 instanceGroupManager: string, The name of the instance group manager. (required)
1710 body: object, The request body. (required)
1711 The object takes the form of:
1712
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001713{ # Represents a Managed Instance Group resource.
1714 #
1715 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1716 #
1717 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1718 #
1719 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001720 "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 -07001721 "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.
1722 "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.
1723 "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.
1724 "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.
1725 "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.
1726 },
1727 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001728 "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 -07001729 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1730 "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.
1731 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1732 "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.
1733 "updatePolicy": { # The update policy for this managed instance group.
1734 "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.
1735 #
1736 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1737 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1738 #
1739 #
1740 # - If the value is fixed, then the calculated value is equal to the fixed value.
1741 # - 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.
1742 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1743 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1744 },
1745 "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.
1746 "instanceRedistributionType": "A String",
1747 "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:
1748 #
1749 #
1750 # - The instance's status is RUNNING.
1751 # - 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.
1752 #
1753 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1754 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1755 #
1756 #
1757 # - If the value is fixed, then the calculated value is equal to the fixed value.
1758 # - 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.
1759 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1760 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1761 },
1762 "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).
1763 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1764 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001765 "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.
1766 "A String",
1767 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001768 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1769 { # The named port. For example: .
1770 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1771 "port": 42, # The port number, which can be a value between 1 and 65535.
1772 },
1773 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001774 "status": { # [Output Only] The status of this managed instance group.
1775 "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.
1776 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1777 "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.
1778 },
1779 },
1780 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1781 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1782 {
1783 "healthCheck": "A String", # The URL for the health check that signals autohealing.
1784 "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].
1785 },
1786 ],
1787 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1788 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
1789 "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.
1790 "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.
1791 #
1792 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1793 "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.
1794 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1795 "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.
1796 "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.
1797 #
1798 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1799 "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.
1800 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1801 "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.
1802 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1803 "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.
1804 "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.
1805 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001806 "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 -07001807 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1808 #
1809 # 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.
1810 {
1811 "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:
1812 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1813 # - 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.
1814 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1815 #
1816 #
1817 # - If the value is fixed, then the calculated value is equal to the fixed value.
1818 # - 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.
1819 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1820 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1821 },
1822 "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.
1823 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1824 },
1825 ],
1826 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1827 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1828 "zones": [ # Zones where the regional managed instance group will create and manage instances.
1829 {
1830 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1831 },
1832 ],
1833 },
1834 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001835 }
1836
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001837 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.
1838
1839For 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.
1840
1841The 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 -07001842
1843Returns:
1844 An object of the form:
1845
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001846 { # Represents an Operation resource.
1847 #
1848 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1849 #
1850 # Operations can be global, regional or zonal.
1851 # - For global operations, use the globalOperations resource.
1852 # - For regional operations, use the regionOperations resource.
1853 # - For zonal operations, use the zonalOperations resource.
1854 #
1855 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001856 "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 -07001857 "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 -04001858 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001859 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001860 "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 -07001861 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1862 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1863 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1864 "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.
1865 "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.
1866 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1867 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1868 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1869 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1870 {
1871 "message": "A String", # [Output Only] A human-readable description of the warning code.
1872 "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.
1873 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1874 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1875 {
1876 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1877 "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).
1878 },
1879 ],
1880 },
1881 ],
1882 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1883 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1884 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1885 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001886 "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 -07001887 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1888 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1889 {
1890 "message": "A String", # [Output Only] An optional, human-readable error message.
1891 "code": "A String", # [Output Only] The error type identifier for this error.
1892 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1893 },
1894 ],
1895 },
1896 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1897 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001898 "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 -07001899 }</pre>
1900</div>
1901
1902</body></html>