blob: 693777dbb52e381a07d54b3e0e2710d0bc00cf35 [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">
78 <code><a href="#abandonInstances">abandonInstances(project, region, instanceGroupManager, body)</a></code></p>
79<p class="firstline">Schedules a group action to remove the specified instances 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>
80<p class="toc_element">
81 <code><a href="#delete">delete(project, region, instanceGroupManager)</a></code></p>
82<p class="firstline">Deletes the specified managed instance group and all of the instances in that group.</p>
83<p class="toc_element">
84 <code><a href="#deleteInstances">deleteInstances(project, region, instanceGroupManager, body)</a></code></p>
85<p class="firstline">Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, instanceGroupManager)</a></code></p>
88<p class="firstline">Returns all of the details about the specified managed instance group.</p>
89<p class="toc_element">
90 <code><a href="#insert">insert(project, region, body)</a></code></p>
91<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group 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>
92<p class="toc_element">
93 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
94<p class="firstline">Retrieves the list of managed instance groups that are contained within the specified region.</p>
95<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080096 <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 -070097<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>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#patch">patch(project, region, instanceGroupManager, body)</a></code></p>
103<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. This method supports patch semantics.</p>
104<p class="toc_element">
105 <code><a href="#recreateInstances">recreateInstances(project, region, instanceGroupManager, body)</a></code></p>
106<p class="firstline">Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
107<p class="toc_element">
108 <code><a href="#resize">resize(project, region, instanceGroupManager, size)</a></code></p>
109<p class="firstline">Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.</p>
110<p class="toc_element">
111 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body)</a></code></p>
112<p class="firstline">Modifies the autohealing policy for the instances in this managed instance group.</p>
113<p class="toc_element">
114 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body)</a></code></p>
115<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>
116<p class="toc_element">
117 <code><a href="#setTargetPools">setTargetPools(project, region, instanceGroupManager, body)</a></code></p>
118<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>
119<p class="toc_element">
120 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
121<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
122<p class="toc_element">
123 <code><a href="#update">update(project, region, instanceGroupManager, body)</a></code></p>
124<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>
125<h3>Method Details</h3>
126<div class="method">
127 <code class="details" id="abandonInstances">abandonInstances(project, region, instanceGroupManager, body)</code>
128 <pre>Schedules a group action to remove the specified instances 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.
129
130Args:
131 project: string, Project ID for this request. (required)
132 region: string, Name of the region scoping this request. (required)
133 instanceGroupManager: string, Name of the managed instance group. (required)
134 body: object, The request body. (required)
135 The object takes the form of:
136
137{
138 "instances": [ # The names of one or more instances to abandon.
139 "A String",
140 ],
141 }
142
143
144Returns:
145 An object of the form:
146
147 { # An Operation resource, used to manage asynchronous API requests.
148 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
149 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700151 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
152 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
153 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
154 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
155 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
156 "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.
157 "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.
158 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
159 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
160 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
161 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
162 {
163 "message": "A String", # [Output Only] A human-readable description of the warning code.
164 "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.
165 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
166 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
167 {
168 "value": "A String", # [Output Only] A warning data value corresponding to the key.
169 "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).
170 },
171 ],
172 },
173 ],
174 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
175 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
176 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
177 "name": "A String", # [Output Only] Name of the resource.
178 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
179 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
180 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
181 {
182 "message": "A String", # [Output Only] An optional, human-readable error message.
183 "code": "A String", # [Output Only] The error type identifier for this error.
184 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
185 },
186 ],
187 },
188 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
189 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800190 "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 -0700191 }</pre>
192</div>
193
194<div class="method">
195 <code class="details" id="delete">delete(project, region, instanceGroupManager)</code>
196 <pre>Deletes the specified managed instance group and all of the instances in that group.
197
198Args:
199 project: string, Project ID for this request. (required)
200 region: string, Name of the region scoping this request. (required)
201 instanceGroupManager: string, Name of the managed instance group to delete. (required)
202
203Returns:
204 An object of the form:
205
206 { # An Operation resource, used to manage asynchronous API requests.
207 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
208 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400209 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700210 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
211 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
212 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
213 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
214 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
215 "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.
216 "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.
217 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
218 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
219 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
220 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
221 {
222 "message": "A String", # [Output Only] A human-readable description of the warning code.
223 "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.
224 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
225 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
226 {
227 "value": "A String", # [Output Only] A warning data value corresponding to the key.
228 "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).
229 },
230 ],
231 },
232 ],
233 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
234 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
235 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
236 "name": "A String", # [Output Only] Name of the resource.
237 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
238 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
239 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
240 {
241 "message": "A String", # [Output Only] An optional, human-readable error message.
242 "code": "A String", # [Output Only] The error type identifier for this error.
243 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
244 },
245 ],
246 },
247 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
248 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800249 "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 -0700250 }</pre>
251</div>
252
253<div class="method">
254 <code class="details" id="deleteInstances">deleteInstances(project, region, instanceGroupManager, body)</code>
255 <pre>Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.
256
257Args:
258 project: string, Project ID for this request. (required)
259 region: string, Name of the region scoping this request. (required)
260 instanceGroupManager: string, Name of the managed instance group. (required)
261 body: object, The request body. (required)
262 The object takes the form of:
263
264{
265 "instances": [ # The names of one or more instances to delete.
266 "A String",
267 ],
268 }
269
270
271Returns:
272 An object of the form:
273
274 { # An Operation resource, used to manage asynchronous API requests.
275 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
276 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400277 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700278 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
279 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
280 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
281 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
282 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
283 "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.
284 "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.
285 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
286 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
287 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
288 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
289 {
290 "message": "A String", # [Output Only] A human-readable description of the warning code.
291 "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.
292 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
293 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
294 {
295 "value": "A String", # [Output Only] A warning data value corresponding to the key.
296 "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).
297 },
298 ],
299 },
300 ],
301 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
302 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
303 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
304 "name": "A String", # [Output Only] Name of the resource.
305 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
306 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
307 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
308 {
309 "message": "A String", # [Output Only] An optional, human-readable error message.
310 "code": "A String", # [Output Only] The error type identifier for this error.
311 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
312 },
313 ],
314 },
315 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
316 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800317 "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 -0700318 }</pre>
319</div>
320
321<div class="method">
322 <code class="details" id="get">get(project, region, instanceGroupManager)</code>
323 <pre>Returns all of the details about the specified managed instance group.
324
325Args:
326 project: string, Project ID for this request. (required)
327 region: string, Name of the region scoping this request. (required)
328 instanceGroupManager: string, Name of the managed instance group to return. (required)
329
330Returns:
331 An object of the form:
332
333 { # An Instance Group Manager resource.
334 "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.
335 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
336 "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.
337 "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.
338 #
339 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
340 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
341 "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.
342 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
343 "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.
344 "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.
345 },
346 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
347 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
348 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
349 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800350 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700351 "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].
352 },
353 ],
354 "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.
355 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
356 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800357 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700358 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
359 "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.
360 "A String",
361 ],
362 "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.
363 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
364 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
365 "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.
366 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
367 { # The named port. For example: .
368 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
369 "port": 42, # The port number, which can be a value between 1 and 65535.
370 },
371 ],
372 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
373 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
374 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
375 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
376 }</pre>
377</div>
378
379<div class="method">
380 <code class="details" id="insert">insert(project, region, body)</code>
381 <pre>Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group 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.
382
383Args:
384 project: string, Project ID for this request. (required)
385 region: string, Name of the region scoping this request. (required)
386 body: object, The request body. (required)
387 The object takes the form of:
388
389{ # An Instance Group Manager resource.
390 "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.
391 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
392 "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.
393 "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.
394 #
395 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
396 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
397 "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.
398 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
399 "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.
400 "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.
401 },
402 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
403 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
404 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
405 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800406 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700407 "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].
408 },
409 ],
410 "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.
411 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
412 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800413 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700414 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
415 "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.
416 "A String",
417 ],
418 "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.
419 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
420 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
421 "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.
422 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
423 { # The named port. For example: .
424 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
425 "port": 42, # The port number, which can be a value between 1 and 65535.
426 },
427 ],
428 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
429 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
430 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
431 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
432 }
433
434
435Returns:
436 An object of the form:
437
438 { # An Operation resource, used to manage asynchronous API requests.
439 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
440 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400441 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700442 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
443 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
444 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
445 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
446 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
447 "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.
448 "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.
449 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
450 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
451 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
452 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
453 {
454 "message": "A String", # [Output Only] A human-readable description of the warning code.
455 "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.
456 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
457 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
458 {
459 "value": "A String", # [Output Only] A warning data value corresponding to the key.
460 "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).
461 },
462 ],
463 },
464 ],
465 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
466 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
467 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
468 "name": "A String", # [Output Only] Name of the resource.
469 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
470 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
471 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
472 {
473 "message": "A String", # [Output Only] An optional, human-readable error message.
474 "code": "A String", # [Output Only] The error type identifier for this error.
475 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
476 },
477 ],
478 },
479 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
480 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800481 "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 -0700482 }</pre>
483</div>
484
485<div class="method">
486 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
487 <pre>Retrieves the list of managed instance groups that are contained within the specified region.
488
489Args:
490 project: string, Project ID for this request. (required)
491 region: string, Name of the region scoping this request. (required)
492 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
493
494You 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.
495
496Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400497 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 -0700498 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.
499 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
500
501The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
502
503For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
504
505You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
506
507To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
508
509Returns:
510 An object of the form:
511
512 { # Contains a list of managed instance groups.
513 "nextPageToken": "A String", # [Output only] A token used to continue a truncated list request.
514 "items": [ # A list of managed instance groups.
515 { # An Instance Group Manager resource.
516 "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.
517 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
518 "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.
519 "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.
520 #
521 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
522 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
523 "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.
524 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
525 "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.
526 "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.
527 },
528 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
529 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
530 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
531 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800532 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700533 "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].
534 },
535 ],
536 "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.
537 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
538 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800539 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700540 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
541 "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.
542 "A String",
543 ],
544 "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.
545 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
546 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
547 "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.
548 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
549 { # The named port. For example: .
550 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
551 "port": 42, # The port number, which can be a value between 1 and 65535.
552 },
553 ],
554 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
555 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
556 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
557 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
558 },
559 ],
560 "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.
561 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
562 "selfLink": "A String", # [Output only] The URL for this resource type. The server generates this URL.
563 }</pre>
564</div>
565
566<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800567 <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 -0700568 <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.
569
570Args:
571 project: string, Project ID for this request. (required)
572 region: string, Name of the region scoping this request. (required)
573 instanceGroupManager: string, The name of the managed instance group. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800574 order_by: string, A parameter
575 maxResults: integer, A parameter
576 pageToken: string, A parameter
577 filter: string, A parameter
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700578
579Returns:
580 An object of the form:
581
582 {
583 "managedInstances": [ # List of managed instances.
584 {
585 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
586 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
587 # - 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.
588 # - 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.
589 # - RECREATING The managed instance group is recreating this instance.
590 # - DELETING The managed instance group is permanently deleting this instance.
591 # - 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.
592 # - RESTARTING The managed instance group is restarting the instance.
593 # - 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.
594 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
595 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
596 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
597 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
598 {
599 "message": "A String", # [Output Only] An optional, human-readable error message.
600 "code": "A String", # [Output Only] The error type identifier for this error.
601 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
602 },
603 ],
604 },
605 },
606 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
607 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
608 },
609 ],
610 }</pre>
611</div>
612
613<div class="method">
614 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
615 <pre>Retrieves the next page of results.
616
617Args:
618 previous_request: The request for the previous page. (required)
619 previous_response: The response from the request for the previous page. (required)
620
621Returns:
622 A request object that you can call 'execute()' on to request the next
623 page. Returns None if there are no more items in the collection.
624 </pre>
625</div>
626
627<div class="method">
628 <code class="details" id="patch">patch(project, region, instanceGroupManager, body)</code>
629 <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. This method supports patch semantics.
630
631Args:
632 project: string, Project ID for this request. (required)
633 region: string, Name of the region scoping this request. (required)
634 instanceGroupManager: string, The name of the instance group manager. (required)
635 body: object, The request body. (required)
636 The object takes the form of:
637
638{ # An Instance Group Manager resource.
639 "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.
640 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
641 "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.
642 "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.
643 #
644 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
645 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
646 "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.
647 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
648 "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.
649 "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.
650 },
651 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
652 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
653 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
654 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800655 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700656 "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].
657 },
658 ],
659 "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.
660 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
661 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800662 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700663 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
664 "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.
665 "A String",
666 ],
667 "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.
668 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
669 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
670 "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.
671 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
672 { # The named port. For example: .
673 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
674 "port": 42, # The port number, which can be a value between 1 and 65535.
675 },
676 ],
677 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
678 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
679 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
680 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
681 }
682
683
684Returns:
685 An object of the form:
686
687 { # An Operation resource, used to manage asynchronous API requests.
688 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
689 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400690 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700691 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
692 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
693 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
694 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
695 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
696 "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.
697 "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.
698 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
699 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
700 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
701 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
702 {
703 "message": "A String", # [Output Only] A human-readable description of the warning code.
704 "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.
705 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
706 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
707 {
708 "value": "A String", # [Output Only] A warning data value corresponding to the key.
709 "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).
710 },
711 ],
712 },
713 ],
714 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
715 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
716 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
717 "name": "A String", # [Output Only] Name of the resource.
718 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
719 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
720 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
721 {
722 "message": "A String", # [Output Only] An optional, human-readable error message.
723 "code": "A String", # [Output Only] The error type identifier for this error.
724 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
725 },
726 ],
727 },
728 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
729 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800730 "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 -0700731 }</pre>
732</div>
733
734<div class="method">
735 <code class="details" id="recreateInstances">recreateInstances(project, region, instanceGroupManager, body)</code>
736 <pre>Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.
737
738Args:
739 project: string, Project ID for this request. (required)
740 region: string, Name of the region scoping this request. (required)
741 instanceGroupManager: string, Name of the managed instance group. (required)
742 body: object, The request body. (required)
743 The object takes the form of:
744
745{
746 "instances": [ # The URL for one or more instances to recreate.
747 "A String",
748 ],
749 }
750
751
752Returns:
753 An object of the form:
754
755 { # An Operation resource, used to manage asynchronous API requests.
756 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
757 "clientOperationId": "A String", # [Output Only] Reserved for future use.
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.
760 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
761 "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.
786 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
787 "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="resize">resize(project, region, instanceGroupManager, size)</code>
804 <pre>Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
805
806Args:
807 project: string, Project ID for this request. (required)
808 region: string, Name of the region scoping this request. (required)
809 instanceGroupManager: string, Name of the managed instance group. (required)
810 size: integer, Number of instances that should exist in this instance group manager. (required)
811
812Returns:
813 An object of the form:
814
815 { # An Operation resource, used to manage asynchronous API requests.
816 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
817 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400818 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700819 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
820 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
821 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
822 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
823 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
824 "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.
825 "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.
826 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
827 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
828 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
829 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
830 {
831 "message": "A String", # [Output Only] A human-readable description of the warning code.
832 "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.
833 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
834 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
835 {
836 "value": "A String", # [Output Only] A warning data value corresponding to the key.
837 "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).
838 },
839 ],
840 },
841 ],
842 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
843 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
844 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
845 "name": "A String", # [Output Only] Name of the resource.
846 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
847 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
848 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
849 {
850 "message": "A String", # [Output Only] An optional, human-readable error message.
851 "code": "A String", # [Output Only] The error type identifier for this error.
852 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
853 },
854 ],
855 },
856 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
857 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800858 "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 -0700859 }</pre>
860</div>
861
862<div class="method">
863 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, region, instanceGroupManager, body)</code>
864 <pre>Modifies the autohealing policy for the instances in this managed instance group.
865
866Args:
867 project: string, Project ID for this request. (required)
868 region: string, Name of the region scoping this request. (required)
869 instanceGroupManager: string, Name of the managed instance group. (required)
870 body: object, The request body. (required)
871 The object takes the form of:
872
873{
874 "autoHealingPolicies": [
875 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800876 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700877 "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].
878 },
879 ],
880 }
881
882
883Returns:
884 An object of the form:
885
886 { # An Operation resource, used to manage asynchronous API requests.
887 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
888 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400889 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700890 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
891 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
892 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
893 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
894 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
895 "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.
896 "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.
897 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
898 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
899 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
900 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
901 {
902 "message": "A String", # [Output Only] A human-readable description of the warning code.
903 "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.
904 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
905 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
906 {
907 "value": "A String", # [Output Only] A warning data value corresponding to the key.
908 "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).
909 },
910 ],
911 },
912 ],
913 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
914 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
915 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
916 "name": "A String", # [Output Only] Name of the resource.
917 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
918 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
919 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
920 {
921 "message": "A String", # [Output Only] An optional, human-readable error message.
922 "code": "A String", # [Output Only] The error type identifier for this error.
923 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
924 },
925 ],
926 },
927 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
928 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800929 "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 -0700930 }</pre>
931</div>
932
933<div class="method">
934 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body)</code>
935 <pre>Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
936
937Args:
938 project: string, Project ID for this request. (required)
939 region: string, Name of the region scoping this request. (required)
940 instanceGroupManager: string, The name of the managed instance group. (required)
941 body: object, The request body. (required)
942 The object takes the form of:
943
944{
945 "instanceTemplate": "A String", # URL of the InstanceTemplate resource from which all new instances will be created.
946 }
947
948
949Returns:
950 An object of the form:
951
952 { # An Operation resource, used to manage asynchronous API requests.
953 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
954 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400955 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700956 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
957 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
958 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
959 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
960 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
961 "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.
962 "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.
963 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
964 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
965 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
966 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
967 {
968 "message": "A String", # [Output Only] A human-readable description of the warning code.
969 "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.
970 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
971 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
972 {
973 "value": "A String", # [Output Only] A warning data value corresponding to the key.
974 "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).
975 },
976 ],
977 },
978 ],
979 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
980 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
981 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
982 "name": "A String", # [Output Only] Name of the resource.
983 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
984 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
985 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
986 {
987 "message": "A String", # [Output Only] An optional, human-readable error message.
988 "code": "A String", # [Output Only] The error type identifier for this error.
989 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
990 },
991 ],
992 },
993 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
994 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800995 "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 -0700996 }</pre>
997</div>
998
999<div class="method">
1000 <code class="details" id="setTargetPools">setTargetPools(project, region, instanceGroupManager, body)</code>
1001 <pre>Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
1002
1003Args:
1004 project: string, Project ID for this request. (required)
1005 region: string, Name of the region scoping this request. (required)
1006 instanceGroupManager: string, Name of the managed instance group. (required)
1007 body: object, The request body. (required)
1008 The object takes the form of:
1009
1010{
1011 "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.
1012 "A String",
1013 ],
1014 "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.
1015 }
1016
1017
1018Returns:
1019 An object of the form:
1020
1021 { # An Operation resource, used to manage asynchronous API requests.
1022 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1023 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001024 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001025 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1026 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1027 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1028 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1029 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1030 "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.
1031 "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.
1032 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1033 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1034 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1035 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1036 {
1037 "message": "A String", # [Output Only] A human-readable description of the warning code.
1038 "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.
1039 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1040 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1041 {
1042 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1043 "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).
1044 },
1045 ],
1046 },
1047 ],
1048 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1049 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1050 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1051 "name": "A String", # [Output Only] Name of the resource.
1052 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1053 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1054 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1055 {
1056 "message": "A String", # [Output Only] An optional, human-readable error message.
1057 "code": "A String", # [Output Only] The error type identifier for this error.
1058 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1059 },
1060 ],
1061 },
1062 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1063 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001064 "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 -07001065 }</pre>
1066</div>
1067
1068<div class="method">
1069 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
1070 <pre>Returns permissions that a caller has on the specified resource.
1071
1072Args:
1073 project: string, Project ID for this request. (required)
1074 region: string, The name of the region for this request. (required)
1075 resource: string, Name of the resource for this request. (required)
1076 body: object, The request body. (required)
1077 The object takes the form of:
1078
1079{
1080 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1081 "A String",
1082 ],
1083 }
1084
1085
1086Returns:
1087 An object of the form:
1088
1089 {
1090 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1091 "A String",
1092 ],
1093 }</pre>
1094</div>
1095
1096<div class="method">
1097 <code class="details" id="update">update(project, region, instanceGroupManager, body)</code>
1098 <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.
1099
1100Args:
1101 project: string, Project ID for this request. (required)
1102 region: string, Name of the region scoping this request. (required)
1103 instanceGroupManager: string, The name of the instance group manager. (required)
1104 body: object, The request body. (required)
1105 The object takes the form of:
1106
1107{ # An Instance Group Manager resource.
1108 "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.
1109 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1110 "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.
1111 "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.
1112 #
1113 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1114 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1115 "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.
1116 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1117 "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.
1118 "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.
1119 },
1120 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1121 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1122 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1123 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001124 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001125 "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].
1126 },
1127 ],
1128 "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.
1129 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1130 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001131 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001132 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1133 "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.
1134 "A String",
1135 ],
1136 "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.
1137 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
1138 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1139 "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.
1140 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1141 { # The named port. For example: .
1142 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1143 "port": 42, # The port number, which can be a value between 1 and 65535.
1144 },
1145 ],
1146 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1147 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1148 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1149 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1150 }
1151
1152
1153Returns:
1154 An object of the form:
1155
1156 { # An Operation resource, used to manage asynchronous API requests.
1157 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1158 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001159 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001160 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1161 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1162 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1163 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1164 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1165 "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.
1166 "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.
1167 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1168 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1169 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1170 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1171 {
1172 "message": "A String", # [Output Only] A human-readable description of the warning code.
1173 "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.
1174 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1175 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1176 {
1177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1178 "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).
1179 },
1180 ],
1181 },
1182 ],
1183 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1185 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1186 "name": "A String", # [Output Only] Name of the resource.
1187 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1190 {
1191 "message": "A String", # [Output Only] An optional, human-readable error message.
1192 "code": "A String", # [Output Only] The error type identifier for this error.
1193 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1194 },
1195 ],
1196 },
1197 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1198 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001199 "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 -07001200 }</pre>
1201</div>
1202
1203</body></html>