blob: 1cb21a2f459a565652f0e0577e0ee237ed278c86 [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">
108 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</a></code></p>
109<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>
110<p class="toc_element">
111 <code><a href="#resize">resize(project, zone, instanceGroupManager, size)</a></code></p>
112<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>
113<p class="toc_element">
114 <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</a></code></p>
115<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>
116<p class="toc_element">
117 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</a></code></p>
118<p class="firstline">Modifies the autohealing policies.</p>
119<p class="toc_element">
120 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</a></code></p>
121<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>
122<p class="toc_element">
123 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</a></code></p>
124<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>
125<p class="toc_element">
126 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
127<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
128<h3>Method Details</h3>
129<div class="method">
130 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</code>
131 <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.
132
133Args:
134 project: string, Project ID for this request. (required)
135 zone: string, The name of the zone where the managed instance group is located. (required)
136 instanceGroupManager: string, The name of the managed instance group. (required)
137 body: object, The request body. (required)
138 The object takes the form of:
139
140{
141 "instances": [ # The URL for one or more instances to abandon from the managed instance group.
142 "A String",
143 ],
144 }
145
146
147Returns:
148 An object of the form:
149
150 { # An Operation resource, used to manage asynchronous API requests.
151 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
152 "clientOperationId": "A String", # [Output Only] Reserved for future use.
153 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
154 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
155 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
156 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
157 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
158 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
159 "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.
160 "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.
161 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
162 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
163 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
164 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
165 {
166 "message": "A String", # [Output Only] A human-readable description of the warning code.
167 "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.
168 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
169 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
170 {
171 "value": "A String", # [Output Only] A warning data value corresponding to the key.
172 "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).
173 },
174 ],
175 },
176 ],
177 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
178 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
179 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
180 "name": "A String", # [Output Only] Name of the resource.
181 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
182 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
183 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
184 {
185 "message": "A String", # [Output Only] An optional, human-readable error message.
186 "code": "A String", # [Output Only] The error type identifier for this error.
187 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
188 },
189 ],
190 },
191 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
192 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800193 "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 -0700194 }</pre>
195</div>
196
197<div class="method">
198 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
199 <pre>Retrieves the list of managed instance groups and groups them by zone.
200
201Args:
202 project: string, Project ID for this request. (required)
203 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
204
205You 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.
206
207Currently, only sorting by name or creationTimestamp desc is supported.
208 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.
209 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.
210 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.
211
212The 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.
213
214For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
215
216You 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.
217
218To 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.
219
220Returns:
221 An object of the form:
222
223 {
224 "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.
225 "items": { # [Output Only] A map of filtered managed instance group lists.
226 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
227 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
228 "message": "A String", # [Output Only] A human-readable description of the warning code.
229 "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.
230 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
231 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
232 {
233 "value": "A String", # [Output Only] A warning data value corresponding to the key.
234 "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).
235 },
236 ],
237 },
238 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
239 { # An Instance Group Manager resource.
240 "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.
241 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
242 "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.
243 "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.
244 #
245 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
246 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
247 "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.
248 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
249 "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.
250 "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.
251 },
252 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
253 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
254 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
255 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800256 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700257 "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].
258 },
259 ],
260 "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.
261 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
262 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800263 "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 -0700264 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
265 "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.
266 "A String",
267 ],
268 "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.
269 "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.
270 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
271 "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.
272 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
273 { # The named port. For example: .
274 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
275 "port": 42, # The port number, which can be a value between 1 and 65535.
276 },
277 ],
278 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
279 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
280 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
281 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
282 },
283 ],
284 },
285 },
286 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
287 "id": "A String", # [Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier.
288 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
289 }</pre>
290</div>
291
292<div class="method">
293 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
294 <pre>Retrieves the next page of results.
295
296Args:
297 previous_request: The request for the previous page. (required)
298 previous_response: The response from the request for the previous page. (required)
299
300Returns:
301 A request object that you can call 'execute()' on to request the next
302 page. Returns None if there are no more items in the collection.
303 </pre>
304</div>
305
306<div class="method">
307 <code class="details" id="delete">delete(project, zone, instanceGroupManager)</code>
308 <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.
309
310Args:
311 project: string, Project ID for this request. (required)
312 zone: string, The name of the zone where the managed instance group is located. (required)
313 instanceGroupManager: string, The name of the managed instance group to delete. (required)
314
315Returns:
316 An object of the form:
317
318 { # An Operation resource, used to manage asynchronous API requests.
319 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
320 "clientOperationId": "A String", # [Output Only] Reserved for future use.
321 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
322 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
323 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
324 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
325 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
326 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
327 "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.
328 "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.
329 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
330 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
331 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
332 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
333 {
334 "message": "A String", # [Output Only] A human-readable description of the warning code.
335 "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.
336 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
337 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
338 {
339 "value": "A String", # [Output Only] A warning data value corresponding to the key.
340 "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).
341 },
342 ],
343 },
344 ],
345 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
346 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
347 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
348 "name": "A String", # [Output Only] Name of the resource.
349 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
350 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
351 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
352 {
353 "message": "A String", # [Output Only] An optional, human-readable error message.
354 "code": "A String", # [Output Only] The error type identifier for this error.
355 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
356 },
357 ],
358 },
359 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
360 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800361 "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 -0700362 }</pre>
363</div>
364
365<div class="method">
366 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</code>
367 <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.
368
369Args:
370 project: string, Project ID for this request. (required)
371 zone: string, The name of the zone where the managed instance group is located. (required)
372 instanceGroupManager: string, The name of the managed instance group. (required)
373 body: object, The request body. (required)
374 The object takes the form of:
375
376{
377 "instances": [ # The list of instances to delete from this managed instance group. Specify one or more instance URLs.
378 "A String",
379 ],
380 }
381
382
383Returns:
384 An object of the form:
385
386 { # An Operation resource, used to manage asynchronous API requests.
387 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
388 "clientOperationId": "A String", # [Output Only] Reserved for future use.
389 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
390 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
391 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
392 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
393 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
394 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
395 "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.
396 "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.
397 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
398 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
399 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
400 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
401 {
402 "message": "A String", # [Output Only] A human-readable description of the warning code.
403 "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.
404 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
405 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
406 {
407 "value": "A String", # [Output Only] A warning data value corresponding to the key.
408 "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).
409 },
410 ],
411 },
412 ],
413 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
414 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
415 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
416 "name": "A String", # [Output Only] Name of the resource.
417 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
418 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
419 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
420 {
421 "message": "A String", # [Output Only] An optional, human-readable error message.
422 "code": "A String", # [Output Only] The error type identifier for this error.
423 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
424 },
425 ],
426 },
427 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
428 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800429 "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 -0700430 }</pre>
431</div>
432
433<div class="method">
434 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
435 <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.
436
437Args:
438 project: string, Project ID for this request. (required)
439 zone: string, The name of the zone where the managed instance group is located. (required)
440 instanceGroupManager: string, The name of the managed instance group. (required)
441
442Returns:
443 An object of the form:
444
445 { # An Instance Group Manager resource.
446 "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.
447 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
448 "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.
449 "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.
450 #
451 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
452 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
453 "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.
454 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
455 "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.
456 "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.
457 },
458 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
459 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
460 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
461 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800462 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700463 "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].
464 },
465 ],
466 "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.
467 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
468 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800469 "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 -0700470 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
471 "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.
472 "A String",
473 ],
474 "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.
475 "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.
476 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
477 "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.
478 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
479 { # The named port. For example: .
480 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
481 "port": 42, # The port number, which can be a value between 1 and 65535.
482 },
483 ],
484 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
485 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
486 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
487 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
488 }</pre>
489</div>
490
491<div class="method">
492 <code class="details" id="insert">insert(project, zone, body)</code>
493 <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.
494
495Args:
496 project: string, Project ID for this request. (required)
497 zone: string, The name of the zone where you want to create the managed instance group. (required)
498 body: object, The request body. (required)
499 The object takes the form of:
500
501{ # An Instance Group Manager resource.
502 "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.
503 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
504 "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.
505 "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.
506 #
507 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
508 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
509 "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.
510 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
511 "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.
512 "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.
513 },
514 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
515 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
516 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
517 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800518 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700519 "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].
520 },
521 ],
522 "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.
523 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
524 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800525 "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 -0700526 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
527 "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.
528 "A String",
529 ],
530 "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.
531 "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.
532 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
533 "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.
534 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
535 { # The named port. For example: .
536 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
537 "port": 42, # The port number, which can be a value between 1 and 65535.
538 },
539 ],
540 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
541 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
542 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
543 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
544 }
545
546
547Returns:
548 An object of the form:
549
550 { # An Operation resource, used to manage asynchronous API requests.
551 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
552 "clientOperationId": "A String", # [Output Only] Reserved for future use.
553 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
554 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
555 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
556 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
557 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
558 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
559 "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.
560 "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.
561 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
562 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
563 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
564 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
565 {
566 "message": "A String", # [Output Only] A human-readable description of the warning code.
567 "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.
568 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
569 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
570 {
571 "value": "A String", # [Output Only] A warning data value corresponding to the key.
572 "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).
573 },
574 ],
575 },
576 ],
577 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
578 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
579 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
580 "name": "A String", # [Output Only] Name of the resource.
581 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
582 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
583 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
584 {
585 "message": "A String", # [Output Only] An optional, human-readable error message.
586 "code": "A String", # [Output Only] The error type identifier for this error.
587 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
588 },
589 ],
590 },
591 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
592 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800593 "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 -0700594 }</pre>
595</div>
596
597<div class="method">
598 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
599 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
600
601Args:
602 project: string, Project ID for this request. (required)
603 zone: string, The name of the zone where the managed instance group is located. (required)
604 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
605
606You 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.
607
608Currently, only sorting by name or creationTimestamp desc is supported.
609 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.
610 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.
611 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.
612
613The 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.
614
615For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
616
617You 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.
618
619To 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.
620
621Returns:
622 An object of the form:
623
624 { # [Output Only] A list of managed instance groups.
625 "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.
626 "items": [ # [Output Only] A list of managed instance groups.
627 { # An Instance Group Manager resource.
628 "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.
629 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
630 "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.
631 "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.
632 #
633 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
634 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
635 "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.
636 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
637 "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.
638 "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.
639 },
640 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
641 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
642 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
643 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800644 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700645 "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].
646 },
647 ],
648 "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.
649 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
650 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800651 "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 -0700652 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
653 "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.
654 "A String",
655 ],
656 "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.
657 "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.
658 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
659 "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.
660 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
661 { # The named port. For example: .
662 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
663 "port": 42, # The port number, which can be a value between 1 and 65535.
664 },
665 ],
666 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
667 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
668 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
669 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
670 },
671 ],
672 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
673 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
674 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
675 }</pre>
676</div>
677
678<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800679 <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 -0700680 <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.
681
682Args:
683 project: string, Project ID for this request. (required)
684 zone: string, The name of the zone where the managed instance group is located. (required)
685 instanceGroupManager: string, The name of the managed instance group. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800686 order_by: string, A parameter
687 maxResults: integer, A parameter
688 pageToken: string, A parameter
689 filter: string, A parameter
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700690
691Returns:
692 An object of the form:
693
694 {
695 "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
696 {
697 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
698 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
699 # - 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.
700 # - 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.
701 # - RECREATING The managed instance group is recreating this instance.
702 # - DELETING The managed instance group is permanently deleting this instance.
703 # - 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.
704 # - RESTARTING The managed instance group is restarting the instance.
705 # - 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.
706 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
707 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
708 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
709 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
710 {
711 "message": "A String", # [Output Only] An optional, human-readable error message.
712 "code": "A String", # [Output Only] The error type identifier for this error.
713 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
714 },
715 ],
716 },
717 },
718 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
719 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
720 },
721 ],
722 }</pre>
723</div>
724
725<div class="method">
726 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
727 <pre>Retrieves the next page of results.
728
729Args:
730 previous_request: The request for the previous page. (required)
731 previous_response: The response from the request for the previous page. (required)
732
733Returns:
734 A request object that you can call 'execute()' on to request the next
735 page. Returns None if there are no more items in the collection.
736 </pre>
737</div>
738
739<div class="method">
740 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</code>
741 <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.
742
743Args:
744 project: string, Project ID for this request. (required)
745 zone: string, The name of the zone where the managed instance group is located. (required)
746 instanceGroupManager: string, The name of the managed instance group. (required)
747 body: object, The request body. (required)
748 The object takes the form of:
749
750{
751 "instances": [ # The URL for one or more instances to recreate.
752 "A String",
753 ],
754 }
755
756
757Returns:
758 An object of the form:
759
760 { # An Operation resource, used to manage asynchronous API requests.
761 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
762 "clientOperationId": "A String", # [Output Only] Reserved for future use.
763 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
764 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
765 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
766 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
767 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
768 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
769 "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.
770 "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.
771 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
772 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
773 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
774 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
775 {
776 "message": "A String", # [Output Only] A human-readable description of the warning code.
777 "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.
778 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
779 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
780 {
781 "value": "A String", # [Output Only] A warning data value corresponding to the key.
782 "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).
783 },
784 ],
785 },
786 ],
787 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
788 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
789 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
790 "name": "A String", # [Output Only] Name of the resource.
791 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
792 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
793 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
794 {
795 "message": "A String", # [Output Only] An optional, human-readable error message.
796 "code": "A String", # [Output Only] The error type identifier for this error.
797 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
798 },
799 ],
800 },
801 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
802 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800803 "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 -0700804 }</pre>
805</div>
806
807<div class="method">
808 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size)</code>
809 <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.
810
811Args:
812 project: string, Project ID for this request. (required)
813 zone: string, The name of the zone where the managed instance group is located. (required)
814 instanceGroupManager: string, The name of the managed instance group. (required)
815 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)
816
817Returns:
818 An object of the form:
819
820 { # An Operation resource, used to manage asynchronous API requests.
821 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
822 "clientOperationId": "A String", # [Output Only] Reserved for future use.
823 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
824 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
825 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
826 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
827 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
828 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
829 "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.
830 "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.
831 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
832 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
833 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
834 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
835 {
836 "message": "A String", # [Output Only] A human-readable description of the warning code.
837 "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.
838 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
839 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
840 {
841 "value": "A String", # [Output Only] A warning data value corresponding to the key.
842 "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).
843 },
844 ],
845 },
846 ],
847 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
848 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
849 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
850 "name": "A String", # [Output Only] Name of the resource.
851 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
852 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
853 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
854 {
855 "message": "A String", # [Output Only] An optional, human-readable error message.
856 "code": "A String", # [Output Only] The error type identifier for this error.
857 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
858 },
859 ],
860 },
861 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
862 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800863 "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 -0700864 }</pre>
865</div>
866
867<div class="method">
868 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</code>
869 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
870
871If 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.
872
873Args:
874 project: string, Project ID for this request. (required)
875 zone: string, The name of the zone where the managed instance group is located. (required)
876 instanceGroupManager: string, The name of the managed instance group. (required)
877 body: object, The request body. (required)
878 The object takes the form of:
879
880{
881 "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.
882 #
883 # 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.
884 #
885 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
886 #
887 # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
888 "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.
889 }
890
891
892Returns:
893 An object of the form:
894
895 { # An Operation resource, used to manage asynchronous API requests.
896 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
897 "clientOperationId": "A String", # [Output Only] Reserved for future use.
898 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
899 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
900 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
901 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
902 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
903 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
904 "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.
905 "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.
906 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
907 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
908 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
909 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
910 {
911 "message": "A String", # [Output Only] A human-readable description of the warning code.
912 "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.
913 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
914 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
915 {
916 "value": "A String", # [Output Only] A warning data value corresponding to the key.
917 "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).
918 },
919 ],
920 },
921 ],
922 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
923 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
924 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
925 "name": "A String", # [Output Only] Name of the resource.
926 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
927 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
928 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
929 {
930 "message": "A String", # [Output Only] An optional, human-readable error message.
931 "code": "A String", # [Output Only] The error type identifier for this error.
932 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
933 },
934 ],
935 },
936 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
937 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800938 "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 -0700939 }</pre>
940</div>
941
942<div class="method">
943 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</code>
944 <pre>Modifies the autohealing policies.
945
946Args:
947 project: string, Project ID for this request. (required)
948 zone: string, The name of the zone where the managed instance group is located. (required)
949 instanceGroupManager: string, The name of the instance group manager. (required)
950 body: object, The request body. (required)
951 The object takes the form of:
952
953{
954 "autoHealingPolicies": [
955 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800956 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700957 "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].
958 },
959 ],
960 }
961
962
963Returns:
964 An object of the form:
965
966 { # An Operation resource, used to manage asynchronous API requests.
967 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
968 "clientOperationId": "A String", # [Output Only] Reserved for future use.
969 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
970 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
971 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
972 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
973 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
974 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
975 "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.
976 "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.
977 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
978 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
979 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
980 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
981 {
982 "message": "A String", # [Output Only] A human-readable description of the warning code.
983 "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.
984 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
985 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
986 {
987 "value": "A String", # [Output Only] A warning data value corresponding to the key.
988 "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).
989 },
990 ],
991 },
992 ],
993 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
994 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
995 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
996 "name": "A String", # [Output Only] Name of the resource.
997 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
998 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
999 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1000 {
1001 "message": "A String", # [Output Only] An optional, human-readable error message.
1002 "code": "A String", # [Output Only] The error type identifier for this error.
1003 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1004 },
1005 ],
1006 },
1007 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1008 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001009 "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 -07001010 }</pre>
1011</div>
1012
1013<div class="method">
1014 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</code>
1015 <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.
1016
1017Args:
1018 project: string, Project ID for this request. (required)
1019 zone: string, The name of the zone where the managed instance group is located. (required)
1020 instanceGroupManager: string, The name of the managed instance group. (required)
1021 body: object, The request body. (required)
1022 The object takes the form of:
1023
1024{
1025 "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.
1026 }
1027
1028
1029Returns:
1030 An object of the form:
1031
1032 { # An Operation resource, used to manage asynchronous API requests.
1033 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1034 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1035 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1036 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1037 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1038 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1039 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1040 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1041 "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.
1042 "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.
1043 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1044 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1045 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1046 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1047 {
1048 "message": "A String", # [Output Only] A human-readable description of the warning code.
1049 "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.
1050 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1051 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1052 {
1053 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1054 "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).
1055 },
1056 ],
1057 },
1058 ],
1059 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1060 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1061 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1062 "name": "A String", # [Output Only] Name of the resource.
1063 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1064 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1065 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1066 {
1067 "message": "A String", # [Output Only] An optional, human-readable error message.
1068 "code": "A String", # [Output Only] The error type identifier for this error.
1069 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1070 },
1071 ],
1072 },
1073 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1074 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001075 "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 -07001076 }</pre>
1077</div>
1078
1079<div class="method">
1080 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</code>
1081 <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.
1082
1083Args:
1084 project: string, Project ID for this request. (required)
1085 zone: string, The name of the zone where the managed instance group is located. (required)
1086 instanceGroupManager: string, The name of the managed instance group. (required)
1087 body: object, The request body. (required)
1088 The object takes the form of:
1089
1090{
1091 "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.
1092 "A String",
1093 ],
1094 "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.
1095 }
1096
1097
1098Returns:
1099 An object of the form:
1100
1101 { # An Operation resource, used to manage asynchronous API requests.
1102 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1103 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1104 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1105 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1106 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1107 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1108 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1109 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1110 "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.
1111 "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.
1112 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1113 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1114 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1115 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1116 {
1117 "message": "A String", # [Output Only] A human-readable description of the warning code.
1118 "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.
1119 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1120 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1121 {
1122 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1123 "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).
1124 },
1125 ],
1126 },
1127 ],
1128 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1129 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1130 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1131 "name": "A String", # [Output Only] Name of the resource.
1132 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1133 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1134 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1135 {
1136 "message": "A String", # [Output Only] An optional, human-readable error message.
1137 "code": "A String", # [Output Only] The error type identifier for this error.
1138 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1139 },
1140 ],
1141 },
1142 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1143 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001144 "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 -07001145 }</pre>
1146</div>
1147
1148<div class="method">
1149 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
1150 <pre>Returns permissions that a caller has on the specified resource.
1151
1152Args:
1153 project: string, Project ID for this request. (required)
1154 zone: string, The name of the zone for this request. (required)
1155 resource: string, Name of the resource for this request. (required)
1156 body: object, The request body. (required)
1157 The object takes the form of:
1158
1159{
1160 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1161 "A String",
1162 ],
1163 }
1164
1165
1166Returns:
1167 An object of the form:
1168
1169 {
1170 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1171 "A String",
1172 ],
1173 }</pre>
1174</div>
1175
1176</body></html>