blob: e633eda034d89830d5664bcdea476492e5d2b8db [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.instanceGroupManagers.html">instanceGroupManagers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#abandonInstances">abandonInstances(project, zone, 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="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#delete">delete(project, zone, instanceGroupManager)</a></code></p>
88<p class="firstline">Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.</p>
89<p class="toc_element">
90 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</a></code></p>
91<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>
92<p class="toc_element">
93 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
94<p class="firstline">Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.</p>
95<p class="toc_element">
96 <code><a href="#insert">insert(project, zone, body)</a></code></p>
97<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>
98<p class="toc_element">
99 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
100<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
101<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800102 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400108 <code><a href="#patch">patch(project, zone, instanceGroupManager, body)</a></code></p>
109<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is 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>
110<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700111 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</a></code></p>
112<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>
113<p class="toc_element">
114 <code><a href="#resize">resize(project, zone, instanceGroupManager, size)</a></code></p>
115<p class="firstline">Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes 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>
116<p class="toc_element">
117 <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</a></code></p>
118<p class="firstline">Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.</p>
119<p class="toc_element">
120 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</a></code></p>
121<p class="firstline">Modifies the autohealing policies.</p>
122<p class="toc_element">
123 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</a></code></p>
124<p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.</p>
125<p class="toc_element">
126 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</a></code></p>
127<p class="firstline">Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.</p>
128<p class="toc_element">
129 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
130<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400131<p class="toc_element">
132 <code><a href="#update">update(project, zone, instanceGroupManager, body)</a></code></p>
133<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700134<h3>Method Details</h3>
135<div class="method">
136 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</code>
137 <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.
138
139Args:
140 project: string, Project ID for this request. (required)
141 zone: string, The name of the zone where the managed instance group is located. (required)
142 instanceGroupManager: string, The name of the managed instance group. (required)
143 body: object, The request body. (required)
144 The object takes the form of:
145
146{
147 "instances": [ # The URL for one or more instances to abandon from the managed instance group.
148 "A String",
149 ],
150 }
151
152
153Returns:
154 An object of the form:
155
156 { # An Operation resource, used to manage asynchronous API requests.
157 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
158 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400159 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
161 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
162 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
163 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
164 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
165 "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.
166 "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.
167 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
168 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
169 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
170 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
171 {
172 "message": "A String", # [Output Only] A human-readable description of the warning code.
173 "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.
174 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
175 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
176 {
177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
178 "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).
179 },
180 ],
181 },
182 ],
183 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
185 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
186 "name": "A String", # [Output Only] Name of the resource.
187 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
190 {
191 "message": "A String", # [Output Only] An optional, human-readable error message.
192 "code": "A String", # [Output Only] The error type identifier for this error.
193 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
194 },
195 ],
196 },
197 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
198 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800199 "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 -0700200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
205 <pre>Retrieves the list of managed instance groups and groups them by zone.
206
207Args:
208 project: string, Project ID for this request. (required)
209 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
210
211You 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.
212
213Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400214 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 -0700215 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.
216 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.
217
218The 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.
219
220For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
221
222You 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.
223
224To 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.
225
226Returns:
227 An object of the form:
228
229 {
230 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
231 "items": { # [Output Only] A map of filtered managed instance group lists.
232 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
233 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
234 "message": "A String", # [Output Only] A human-readable description of the warning code.
235 "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.
236 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
237 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
238 {
239 "value": "A String", # [Output Only] A warning data value corresponding to the key.
240 "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).
241 },
242 ],
243 },
244 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
245 { # An Instance Group Manager resource.
246 "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.
247 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
248 "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.
249 "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.
250 #
251 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
252 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
253 "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.
254 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
255 "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.
256 "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.
257 },
258 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
259 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
260 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
261 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800262 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700263 "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].
264 },
265 ],
266 "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.
267 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
268 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800269 "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 -0700270 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
271 "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.
272 "A String",
273 ],
274 "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.
275 "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.
276 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
277 "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.
278 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
279 { # The named port. For example: .
280 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
281 "port": 42, # The port number, which can be a value between 1 and 65535.
282 },
283 ],
284 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
285 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
286 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
287 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
288 },
289 ],
290 },
291 },
292 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
293 "id": "A String", # [Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier.
294 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
295 }</pre>
296</div>
297
298<div class="method">
299 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
300 <pre>Retrieves the next page of results.
301
302Args:
303 previous_request: The request for the previous page. (required)
304 previous_response: The response from the request for the previous page. (required)
305
306Returns:
307 A request object that you can call 'execute()' on to request the next
308 page. Returns None if there are no more items in the collection.
309 </pre>
310</div>
311
312<div class="method">
313 <code class="details" id="delete">delete(project, zone, instanceGroupManager)</code>
314 <pre>Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
315
316Args:
317 project: string, Project ID for this request. (required)
318 zone: string, The name of the zone where the managed instance group is located. (required)
319 instanceGroupManager: string, The name of the managed instance group to delete. (required)
320
321Returns:
322 An object of the form:
323
324 { # An Operation resource, used to manage asynchronous API requests.
325 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
326 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400327 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700328 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
329 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
330 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
331 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
332 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
333 "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.
334 "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.
335 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
336 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
337 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
338 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
339 {
340 "message": "A String", # [Output Only] A human-readable description of the warning code.
341 "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.
342 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
343 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
344 {
345 "value": "A String", # [Output Only] A warning data value corresponding to the key.
346 "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).
347 },
348 ],
349 },
350 ],
351 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
352 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
353 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
354 "name": "A String", # [Output Only] Name of the resource.
355 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
356 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
357 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
358 {
359 "message": "A String", # [Output Only] An optional, human-readable error message.
360 "code": "A String", # [Output Only] The error type identifier for this error.
361 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
362 },
363 ],
364 },
365 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
366 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800367 "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 -0700368 }</pre>
369</div>
370
371<div class="method">
372 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</code>
373 <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.
374
375Args:
376 project: string, Project ID for this request. (required)
377 zone: string, The name of the zone where the managed instance group is located. (required)
378 instanceGroupManager: string, The name of the managed instance group. (required)
379 body: object, The request body. (required)
380 The object takes the form of:
381
382{
383 "instances": [ # The list of instances to delete from this managed instance group. Specify one or more instance URLs.
384 "A String",
385 ],
386 }
387
388
389Returns:
390 An object of the form:
391
392 { # An Operation resource, used to manage asynchronous API requests.
393 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
394 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400395 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700396 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
397 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
398 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
399 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
400 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
401 "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.
402 "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.
403 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
404 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
405 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
406 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
407 {
408 "message": "A String", # [Output Only] A human-readable description of the warning code.
409 "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.
410 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
411 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
412 {
413 "value": "A String", # [Output Only] A warning data value corresponding to the key.
414 "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).
415 },
416 ],
417 },
418 ],
419 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
420 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
421 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
422 "name": "A String", # [Output Only] Name of the resource.
423 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
424 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
425 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
426 {
427 "message": "A String", # [Output Only] An optional, human-readable error message.
428 "code": "A String", # [Output Only] The error type identifier for this error.
429 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
430 },
431 ],
432 },
433 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
434 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800435 "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 -0700436 }</pre>
437</div>
438
439<div class="method">
440 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
441 <pre>Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.
442
443Args:
444 project: string, Project ID for this request. (required)
445 zone: string, The name of the zone where the managed instance group is located. (required)
446 instanceGroupManager: string, The name of the managed instance group. (required)
447
448Returns:
449 An object of the form:
450
451 { # An Instance Group Manager resource.
452 "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.
453 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
454 "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.
455 "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.
456 #
457 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
458 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
459 "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.
460 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
461 "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.
462 "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.
463 },
464 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
465 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
466 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
467 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800468 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700469 "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].
470 },
471 ],
472 "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.
473 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
474 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800475 "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 -0700476 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
477 "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.
478 "A String",
479 ],
480 "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.
481 "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.
482 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
483 "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.
484 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
485 { # The named port. For example: .
486 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
487 "port": 42, # The port number, which can be a value between 1 and 65535.
488 },
489 ],
490 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
491 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
492 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
493 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
494 }</pre>
495</div>
496
497<div class="method">
498 <code class="details" id="insert">insert(project, zone, body)</code>
499 <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.
500
501Args:
502 project: string, Project ID for this request. (required)
503 zone: string, The name of the zone where you want to create the managed instance group. (required)
504 body: object, The request body. (required)
505 The object takes the form of:
506
507{ # An Instance Group Manager resource.
508 "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.
509 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
510 "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.
511 "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.
512 #
513 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
514 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
515 "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.
516 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
517 "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.
518 "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.
519 },
520 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
521 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
522 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
523 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800524 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700525 "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].
526 },
527 ],
528 "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.
529 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
530 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800531 "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 -0700532 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
533 "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.
534 "A String",
535 ],
536 "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.
537 "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.
538 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
539 "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.
540 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
541 { # The named port. For example: .
542 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
543 "port": 42, # The port number, which can be a value between 1 and 65535.
544 },
545 ],
546 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
547 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
548 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
549 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
550 }
551
552
553Returns:
554 An object of the form:
555
556 { # An Operation resource, used to manage asynchronous API requests.
557 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
558 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400559 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
561 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
562 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
563 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
564 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
565 "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.
566 "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.
567 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
568 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
569 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
570 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
571 {
572 "message": "A String", # [Output Only] A human-readable description of the warning code.
573 "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.
574 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
575 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
576 {
577 "value": "A String", # [Output Only] A warning data value corresponding to the key.
578 "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).
579 },
580 ],
581 },
582 ],
583 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
584 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
585 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
586 "name": "A String", # [Output Only] Name of the resource.
587 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
588 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
589 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
590 {
591 "message": "A String", # [Output Only] An optional, human-readable error message.
592 "code": "A String", # [Output Only] The error type identifier for this error.
593 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
594 },
595 ],
596 },
597 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
598 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800599 "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 -0700600 }</pre>
601</div>
602
603<div class="method">
604 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
605 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
606
607Args:
608 project: string, Project ID for this request. (required)
609 zone: string, The name of the zone where the managed instance group is located. (required)
610 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
611
612You 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.
613
614Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400615 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 -0700616 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.
617 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.
618
619The 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.
620
621For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
622
623You 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.
624
625To 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.
626
627Returns:
628 An object of the form:
629
630 { # [Output Only] A list of managed instance groups.
631 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
632 "items": [ # [Output Only] A list of managed instance groups.
633 { # An Instance Group Manager resource.
634 "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.
635 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
636 "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.
637 "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.
638 #
639 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
640 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
641 "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.
642 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
643 "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.
644 "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.
645 },
646 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
647 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
648 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
649 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800650 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700651 "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].
652 },
653 ],
654 "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.
655 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
656 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800657 "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 -0700658 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
659 "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.
660 "A String",
661 ],
662 "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.
663 "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.
664 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
665 "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.
666 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
667 { # The named port. For example: .
668 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
669 "port": 42, # The port number, which can be a value between 1 and 65535.
670 },
671 ],
672 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
673 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
674 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
675 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
676 },
677 ],
678 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
679 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
680 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
681 }</pre>
682</div>
683
684<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800685 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700686 <pre>Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.
687
688Args:
689 project: string, Project ID for this request. (required)
690 zone: string, The name of the zone where the managed instance group is located. (required)
691 instanceGroupManager: string, The name of the managed instance group. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800692 order_by: string, A parameter
693 maxResults: integer, A parameter
694 pageToken: string, A parameter
695 filter: string, A parameter
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700696
697Returns:
698 An object of the form:
699
700 {
701 "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
702 {
703 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
704 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
705 # - 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.
706 # - 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.
707 # - RECREATING The managed instance group is recreating this instance.
708 # - DELETING The managed instance group is permanently deleting this instance.
709 # - 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.
710 # - RESTARTING The managed instance group is restarting the instance.
711 # - 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.
712 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
713 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
714 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
715 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
716 {
717 "message": "A String", # [Output Only] An optional, human-readable error message.
718 "code": "A String", # [Output Only] The error type identifier for this error.
719 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
720 },
721 ],
722 },
723 },
724 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
725 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
726 },
727 ],
728 }</pre>
729</div>
730
731<div class="method">
732 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
733 <pre>Retrieves the next page of results.
734
735Args:
736 previous_request: The request for the previous page. (required)
737 previous_response: The response from the request for the previous page. (required)
738
739Returns:
740 A request object that you can call 'execute()' on to request the next
741 page. Returns None if there are no more items in the collection.
742 </pre>
743</div>
744
745<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400746 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body)</code>
747 <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.
748
749Args:
750 project: string, Project ID for this request. (required)
751 zone: string, The name of the zone where you want to create the managed instance group. (required)
752 instanceGroupManager: string, The name of the instance group manager. (required)
753 body: object, The request body. (required)
754 The object takes the form of:
755
756{ # An Instance Group Manager resource.
757 "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.
758 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
759 "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.
760 "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.
761 #
762 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
763 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
764 "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.
765 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
766 "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.
767 "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.
768 },
769 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
770 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
771 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
772 {
773 "healthCheck": "A String", # The URL for the health check that signals autohealing.
774 "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].
775 },
776 ],
777 "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.
778 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
779 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
780 "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.
781 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
782 "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.
783 "A String",
784 ],
785 "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.
786 "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.
787 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
788 "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.
789 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
790 { # The named port. For example: .
791 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
792 "port": 42, # The port number, which can be a value between 1 and 65535.
793 },
794 ],
795 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
796 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
797 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
798 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
799 }
800
801
802Returns:
803 An object of the form:
804
805 { # An Operation resource, used to manage asynchronous API requests.
806 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
807 "clientOperationId": "A String", # [Output Only] Reserved for future use.
808 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
809 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
810 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
811 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
812 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
813 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
814 "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.
815 "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.
816 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
817 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
818 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
819 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
820 {
821 "message": "A String", # [Output Only] A human-readable description of the warning code.
822 "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.
823 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
824 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
825 {
826 "value": "A String", # [Output Only] A warning data value corresponding to the key.
827 "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).
828 },
829 ],
830 },
831 ],
832 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
833 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
834 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
835 "name": "A String", # [Output Only] Name of the resource.
836 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
837 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
838 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
839 {
840 "message": "A String", # [Output Only] An optional, human-readable error message.
841 "code": "A String", # [Output Only] The error type identifier for this error.
842 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
843 },
844 ],
845 },
846 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
847 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
848 "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.
849 }</pre>
850</div>
851
852<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700853 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</code>
854 <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.
855
856Args:
857 project: string, Project ID for this request. (required)
858 zone: string, The name of the zone where the managed instance group is located. (required)
859 instanceGroupManager: string, The name of the managed instance group. (required)
860 body: object, The request body. (required)
861 The object takes the form of:
862
863{
864 "instances": [ # The URL for one or more instances to recreate.
865 "A String",
866 ],
867 }
868
869
870Returns:
871 An object of the form:
872
873 { # An Operation resource, used to manage asynchronous API requests.
874 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
875 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400876 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700877 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
878 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
879 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
880 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
881 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
882 "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.
883 "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.
884 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
885 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
886 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
887 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
888 {
889 "message": "A String", # [Output Only] A human-readable description of the warning code.
890 "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.
891 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
892 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
893 {
894 "value": "A String", # [Output Only] A warning data value corresponding to the key.
895 "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).
896 },
897 ],
898 },
899 ],
900 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
901 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
902 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
903 "name": "A String", # [Output Only] Name of the resource.
904 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
905 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
906 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
907 {
908 "message": "A String", # [Output Only] An optional, human-readable error message.
909 "code": "A String", # [Output Only] The error type identifier for this error.
910 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
911 },
912 ],
913 },
914 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
915 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800916 "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 -0700917 }</pre>
918</div>
919
920<div class="method">
921 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size)</code>
922 <pre>Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes 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.
923
924Args:
925 project: string, Project ID for this request. (required)
926 zone: string, The name of the zone where the managed instance group is located. (required)
927 instanceGroupManager: string, The name of the managed instance group. (required)
928 size: integer, The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. (required)
929
930Returns:
931 An object of the form:
932
933 { # An Operation resource, used to manage asynchronous API requests.
934 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
935 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400936 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700937 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
938 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
939 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
940 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
941 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
942 "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.
943 "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.
944 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
945 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
946 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
947 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
948 {
949 "message": "A String", # [Output Only] A human-readable description of the warning code.
950 "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.
951 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
952 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
953 {
954 "value": "A String", # [Output Only] A warning data value corresponding to the key.
955 "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).
956 },
957 ],
958 },
959 ],
960 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
961 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
962 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
963 "name": "A String", # [Output Only] Name of the resource.
964 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
965 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
966 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
967 {
968 "message": "A String", # [Output Only] An optional, human-readable error message.
969 "code": "A String", # [Output Only] The error type identifier for this error.
970 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
971 },
972 ],
973 },
974 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
975 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800976 "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 -0700977 }</pre>
978</div>
979
980<div class="method">
981 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</code>
982 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
983
984If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes 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, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.
985
986Args:
987 project: string, Project ID for this request. (required)
988 zone: string, The name of the zone where the managed instance group is located. (required)
989 instanceGroupManager: string, The name of the managed instance group. (required)
990 body: object, The request body. (required)
991 The object takes the form of:
992
993{
994 "noCreationRetries": True or False, # If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attemps to recreate each instance continuously until it succeeds.
995 #
996 # This flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.
997 #
998 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
999 #
1000 # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
1001 "targetSize": 42, # The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
1002 }
1003
1004
1005Returns:
1006 An object of the form:
1007
1008 { # An Operation resource, used to manage asynchronous API requests.
1009 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1010 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001011 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001012 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1013 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1014 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1015 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1016 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1017 "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.
1018 "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.
1019 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1020 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1021 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1022 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1023 {
1024 "message": "A String", # [Output Only] A human-readable description of the warning code.
1025 "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.
1026 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1027 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1028 {
1029 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1030 "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).
1031 },
1032 ],
1033 },
1034 ],
1035 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1036 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1037 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1038 "name": "A String", # [Output Only] Name of the resource.
1039 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1040 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1041 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1042 {
1043 "message": "A String", # [Output Only] An optional, human-readable error message.
1044 "code": "A String", # [Output Only] The error type identifier for this error.
1045 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1046 },
1047 ],
1048 },
1049 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1050 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001051 "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 -07001052 }</pre>
1053</div>
1054
1055<div class="method">
1056 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</code>
1057 <pre>Modifies the autohealing policies.
1058
1059Args:
1060 project: string, Project ID for this request. (required)
1061 zone: string, The name of the zone where the managed instance group is located. (required)
1062 instanceGroupManager: string, The name of the instance group manager. (required)
1063 body: object, The request body. (required)
1064 The object takes the form of:
1065
1066{
1067 "autoHealingPolicies": [
1068 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001069 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001070 "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].
1071 },
1072 ],
1073 }
1074
1075
1076Returns:
1077 An object of the form:
1078
1079 { # An Operation resource, used to manage asynchronous API requests.
1080 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1081 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001082 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001083 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1084 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1085 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1086 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1087 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1088 "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.
1089 "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.
1090 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1091 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1092 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1093 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1094 {
1095 "message": "A String", # [Output Only] A human-readable description of the warning code.
1096 "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.
1097 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1098 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1099 {
1100 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1101 "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).
1102 },
1103 ],
1104 },
1105 ],
1106 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1107 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1108 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1109 "name": "A String", # [Output Only] Name of the resource.
1110 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1111 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1112 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1113 {
1114 "message": "A String", # [Output Only] An optional, human-readable error message.
1115 "code": "A String", # [Output Only] The error type identifier for this error.
1116 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1117 },
1118 ],
1119 },
1120 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1121 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001122 "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 -07001123 }</pre>
1124</div>
1125
1126<div class="method">
1127 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</code>
1128 <pre>Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.
1129
1130Args:
1131 project: string, Project ID for this request. (required)
1132 zone: string, The name of the zone where the managed instance group is located. (required)
1133 instanceGroupManager: string, The name of the managed instance group. (required)
1134 body: object, The request body. (required)
1135 The object takes the form of:
1136
1137{
1138 "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.
1139 }
1140
1141
1142Returns:
1143 An object of the form:
1144
1145 { # An Operation resource, used to manage asynchronous API requests.
1146 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1147 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001148 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001149 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1150 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1151 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1152 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1153 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1154 "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.
1155 "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.
1156 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1157 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1158 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1159 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1160 {
1161 "message": "A String", # [Output Only] A human-readable description of the warning code.
1162 "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.
1163 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1164 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1165 {
1166 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1167 "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).
1168 },
1169 ],
1170 },
1171 ],
1172 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1173 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1174 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1175 "name": "A String", # [Output Only] Name of the resource.
1176 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1177 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1178 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1179 {
1180 "message": "A String", # [Output Only] An optional, human-readable error message.
1181 "code": "A String", # [Output Only] The error type identifier for this error.
1182 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1183 },
1184 ],
1185 },
1186 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1187 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001188 "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 -07001189 }</pre>
1190</div>
1191
1192<div class="method">
1193 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</code>
1194 <pre>Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
1195
1196Args:
1197 project: string, Project ID for this request. (required)
1198 zone: string, The name of the zone where the managed instance group is located. (required)
1199 instanceGroupManager: string, The name of the managed instance group. (required)
1200 body: object, The request body. (required)
1201 The object takes the form of:
1202
1203{
1204 "targetPools": [ # The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.
1205 "A String",
1206 ],
1207 "fingerprint": "A String", # The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.
1208 }
1209
1210
1211Returns:
1212 An object of the form:
1213
1214 { # An Operation resource, used to manage asynchronous API requests.
1215 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1216 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001217 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001218 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1219 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1220 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1221 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1222 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1223 "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.
1224 "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.
1225 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1226 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1227 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1228 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1229 {
1230 "message": "A String", # [Output Only] A human-readable description of the warning code.
1231 "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.
1232 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1233 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1234 {
1235 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1236 "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).
1237 },
1238 ],
1239 },
1240 ],
1241 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1242 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1243 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1244 "name": "A String", # [Output Only] Name of the resource.
1245 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1246 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1247 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1248 {
1249 "message": "A String", # [Output Only] An optional, human-readable error message.
1250 "code": "A String", # [Output Only] The error type identifier for this error.
1251 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1252 },
1253 ],
1254 },
1255 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1256 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001257 "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 -07001258 }</pre>
1259</div>
1260
1261<div class="method">
1262 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
1263 <pre>Returns permissions that a caller has on the specified resource.
1264
1265Args:
1266 project: string, Project ID for this request. (required)
1267 zone: string, The name of the zone for this request. (required)
1268 resource: string, Name of the resource for this request. (required)
1269 body: object, The request body. (required)
1270 The object takes the form of:
1271
1272{
1273 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1274 "A String",
1275 ],
1276 }
1277
1278
1279Returns:
1280 An object of the form:
1281
1282 {
1283 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1284 "A String",
1285 ],
1286 }</pre>
1287</div>
1288
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001289<div class="method">
1290 <code class="details" id="update">update(project, zone, instanceGroupManager, body)</code>
1291 <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.
1292
1293Args:
1294 project: string, Project ID for this request. (required)
1295 zone: string, The name of the zone where you want to create the managed instance group. (required)
1296 instanceGroupManager: string, The name of the instance group manager. (required)
1297 body: object, The request body. (required)
1298 The object takes the form of:
1299
1300{ # An Instance Group Manager resource.
1301 "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.
1302 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1303 "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.
1304 "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.
1305 #
1306 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1307 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1308 "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.
1309 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1310 "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.
1311 "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.
1312 },
1313 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1314 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1315 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1316 {
1317 "healthCheck": "A String", # The URL for the health check that signals autohealing.
1318 "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].
1319 },
1320 ],
1321 "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.
1322 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1323 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1324 "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.
1325 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1326 "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.
1327 "A String",
1328 ],
1329 "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.
1330 "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.
1331 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1332 "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.
1333 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1334 { # The named port. For example: .
1335 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1336 "port": 42, # The port number, which can be a value between 1 and 65535.
1337 },
1338 ],
1339 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1340 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1341 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1342 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1343 }
1344
1345
1346Returns:
1347 An object of the form:
1348
1349 { # An Operation resource, used to manage asynchronous API requests.
1350 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1351 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1352 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1353 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1354 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1355 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1356 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1357 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1358 "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.
1359 "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.
1360 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1361 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1362 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1363 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1364 {
1365 "message": "A String", # [Output Only] A human-readable description of the warning code.
1366 "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.
1367 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1368 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1369 {
1370 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1371 "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).
1372 },
1373 ],
1374 },
1375 ],
1376 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1377 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1378 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1379 "name": "A String", # [Output Only] Name of the resource.
1380 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1381 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1382 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1383 {
1384 "message": "A String", # [Output Only] An optional, human-readable error message.
1385 "code": "A String", # [Output Only] The error type identifier for this error.
1386 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1387 },
1388 ],
1389 },
1390 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1391 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1392 "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.
1393 }</pre>
1394</div>
1395
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001396</body></html>