blob: ec3a1156693d5161c8ac215bd0bc051839292ce8 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -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_v1.html">Compute Engine API</a> . <a href="compute_v1.instanceGroups.html">instanceGroups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#addInstances">addInstances(project, zone, instanceGroup, body)</a></code></p>
79<p class="firstline">Adds a list of instances to an instance group. All of the instances in the instance group must be in the same network.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">Retrieves the list of instance groups, and sorts 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, instanceGroup)</a></code></p>
88<p class="firstline">Deletes the specified instance group.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, zone, instanceGroup)</a></code></p>
91<p class="firstline">Returns the specified instance group resource.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(project, zone, body)</a></code></p>
94<p class="firstline">Creates an instance group in the specified project using the parameters that are included in the request.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Retrieves the list of instance groups that are located in the specified project and zone.</p>
98<p class="toc_element">
99 <code><a href="#listInstances">listInstances(project, zone, instanceGroup, body, maxResults=None, pageToken=None, filter=None)</a></code></p>
100<p class="firstline">Lists instances in an instance group. The parameters for this method specify whether the list filters instances by state and named ports information.</p>
101<p class="toc_element">
102 <code><a href="#listInstances_next">listInstances_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</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="#removeInstances">removeInstances(project, zone, instanceGroup, body)</a></code></p>
109<p class="firstline">Removes a list of instances from an instance group.</p>
110<p class="toc_element">
111 <code><a href="#setNamedPorts">setNamedPorts(project, zone, instanceGroup, body)</a></code></p>
112<p class="firstline">Sets the named ports in an instance group.</p>
113<h3>Method Details</h3>
114<div class="method">
115 <code class="details" id="addInstances">addInstances(project, zone, instanceGroup, body)</code>
116 <pre>Adds a list of instances to an instance group. All of the instances in the instance group must be in the same network.
117
118Args:
119 project: string, The project ID for this request. (required)
120 zone: string, The URL of the zone where the instance group is located. (required)
121 instanceGroup: string, The name of the instance group where you are adding instances. (required)
122 body: object, The request body. (required)
123 The object takes the form of:
124
125{
126 "instances": [ # The instances to add to the instance group.
127 {
128 "instance": "A String",
129 },
130 ],
131 }
132
133
134Returns:
135 An object of the form:
136
137 { # An Operation resource, used to manage asynchronous API requests.
138 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
139 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
140 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
141 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
142 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
143 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
144 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
145 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
146 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
147 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
148 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
149 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
150 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
151 {
152 "message": "A String", # [Output Only] Optional human-readable details for this warning.
153 "code": "A String", # [Output Only] The warning type identifier for this warning.
154 "data": [ # [Output Only] Metadata for this warning in key: value format.
155 {
156 "value": "A String", # [Output Only] A warning data value corresponding to the key.
157 "key": "A String", # [Output Only] A key for the warning data.
158 },
159 ],
160 },
161 ],
162 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
163 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
164 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
165 "name": "A String", # [Output Only] Name of the resource.
166 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
167 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
168 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
169 {
170 "message": "A String", # [Output Only] An optional, human-readable error message.
171 "code": "A String", # [Output Only] The error type identifier for this error.
172 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
173 },
174 ],
175 },
176 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
177 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
178 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
179 }</pre>
180</div>
181
182<div class="method">
183 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
184 <pre>Retrieves the list of instance groups, and sorts them by zone.
185
186Args:
187 project: string, The project ID for this request. (required)
188 maxResults: integer, Maximum count of results to be returned.
189 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
190 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.
191
192The 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 (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.
193
194For example, filter=name ne example-instance.
195
196Returns:
197 An object of the form:
198
199 {
200 "nextPageToken": "A String", # [Output Only] A token that is used to continue a truncated list request.
201 "items": { # A map of scoped instance group lists.
202 "a_key": { # The name of the scope that contains this set of instance groups.
203 "warning": { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty.
204 "message": "A String", # [Output Only] Optional human-readable details for this warning.
205 "code": "A String", # [Output Only] The warning type identifier for this warning.
206 "data": [ # [Output Only] Metadata for this warning in key: value format.
207 {
208 "value": "A String", # [Output Only] A warning data value corresponding to the key.
209 "key": "A String", # [Output Only] A key for the warning data.
210 },
211 ],
212 },
213 "instanceGroups": [ # [Output Only] The list of instance groups that are contained in this scope.
214 {
215 "size": 42, # [Output Only] The total number of instances in the instance group.
216 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
217 "description": "A String", # An optional text description for the instance group.
218 "zone": "A String", # The URL of the zone where the instance group is located.
219 "network": "A String", # The URL of the network to which all instances in the instance group belong.
220 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports information. The system uses this fingerprint to detect conflicts when multiple users change the named ports information concurrently.
221 "namedPorts": [ # Assigns a name to a port number. For example: {name: ?http?, port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: ?http?, port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group.
222 { # The named port information. For example: .
223 "name": "A String", # The name for this NamedPort.
224 "port": 42, # The port number, which can be a value between 1 and 65535.
225 },
226 ],
227 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
228 "id": "A String", # [Output Only] A unique identifier for this instance group. The server defines this identifier.
229 "selfLink": "A String", # [Output Only] The URL for this instance group. The server defines this URL.
230 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
231 },
232 ],
233 },
234 },
235 "kind": "compute#instanceGroupAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.
236 "id": "A String", # [Output Only] A unique identifier for this aggregated list of instance groups. The server defines this identifier.
237 "selfLink": "A String", # [Output Only] A unique identifier for this aggregated list of instance groups. The server defines this identifier.
238 }</pre>
239</div>
240
241<div class="method">
242 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
243 <pre>Retrieves the next page of results.
244
245Args:
246 previous_request: The request for the previous page. (required)
247 previous_response: The response from the request for the previous page. (required)
248
249Returns:
250 A request object that you can call 'execute()' on to request the next
251 page. Returns None if there are no more items in the collection.
252 </pre>
253</div>
254
255<div class="method">
256 <code class="details" id="delete">delete(project, zone, instanceGroup)</code>
257 <pre>Deletes the specified instance group.
258
259Args:
260 project: string, The project ID for this request. (required)
261 zone: string, The URL of the zone where the instance group is located. (required)
262 instanceGroup: string, The name of the instance group to delete. (required)
263
264Returns:
265 An object of the form:
266
267 { # An Operation resource, used to manage asynchronous API requests.
268 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
269 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
270 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
271 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
272 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
273 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
274 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
275 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
276 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
277 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
278 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
279 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
280 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
281 {
282 "message": "A String", # [Output Only] Optional human-readable details for this warning.
283 "code": "A String", # [Output Only] The warning type identifier for this warning.
284 "data": [ # [Output Only] Metadata for this warning in key: value format.
285 {
286 "value": "A String", # [Output Only] A warning data value corresponding to the key.
287 "key": "A String", # [Output Only] A key for the warning data.
288 },
289 ],
290 },
291 ],
292 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
293 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
294 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
295 "name": "A String", # [Output Only] Name of the resource.
296 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
297 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
298 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
299 {
300 "message": "A String", # [Output Only] An optional, human-readable error message.
301 "code": "A String", # [Output Only] The error type identifier for this error.
302 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
303 },
304 ],
305 },
306 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
307 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
308 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
309 }</pre>
310</div>
311
312<div class="method">
313 <code class="details" id="get">get(project, zone, instanceGroup)</code>
314 <pre>Returns the specified instance group resource.
315
316Args:
317 project: string, The project ID for this request. (required)
318 zone: string, The URL of the zone where the instance group is located. (required)
319 instanceGroup: string, The name of the instance group. (required)
320
321Returns:
322 An object of the form:
323
324 {
325 "size": 42, # [Output Only] The total number of instances in the instance group.
326 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
327 "description": "A String", # An optional text description for the instance group.
328 "zone": "A String", # The URL of the zone where the instance group is located.
329 "network": "A String", # The URL of the network to which all instances in the instance group belong.
330 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports information. The system uses this fingerprint to detect conflicts when multiple users change the named ports information concurrently.
331 "namedPorts": [ # Assigns a name to a port number. For example: {name: ?http?, port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: ?http?, port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group.
332 { # The named port information. For example: .
333 "name": "A String", # The name for this NamedPort.
334 "port": 42, # The port number, which can be a value between 1 and 65535.
335 },
336 ],
337 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
338 "id": "A String", # [Output Only] A unique identifier for this instance group. The server defines this identifier.
339 "selfLink": "A String", # [Output Only] The URL for this instance group. The server defines this URL.
340 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
341 }</pre>
342</div>
343
344<div class="method">
345 <code class="details" id="insert">insert(project, zone, body)</code>
346 <pre>Creates an instance group in the specified project using the parameters that are included in the request.
347
348Args:
349 project: string, The project ID for this request. (required)
350 zone: string, The URL of the zone where the instance group is located. (required)
351 body: object, The request body. (required)
352 The object takes the form of:
353
354{
355 "size": 42, # [Output Only] The total number of instances in the instance group.
356 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
357 "description": "A String", # An optional text description for the instance group.
358 "zone": "A String", # The URL of the zone where the instance group is located.
359 "network": "A String", # The URL of the network to which all instances in the instance group belong.
360 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports information. The system uses this fingerprint to detect conflicts when multiple users change the named ports information concurrently.
361 "namedPorts": [ # Assigns a name to a port number. For example: {name: ?http?, port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: ?http?, port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group.
362 { # The named port information. For example: .
363 "name": "A String", # The name for this NamedPort.
364 "port": 42, # The port number, which can be a value between 1 and 65535.
365 },
366 ],
367 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
368 "id": "A String", # [Output Only] A unique identifier for this instance group. The server defines this identifier.
369 "selfLink": "A String", # [Output Only] The URL for this instance group. The server defines this URL.
370 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
371 }
372
373
374Returns:
375 An object of the form:
376
377 { # An Operation resource, used to manage asynchronous API requests.
378 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
379 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
380 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
381 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
382 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
383 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
384 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
385 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
386 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
387 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
388 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
389 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
390 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
391 {
392 "message": "A String", # [Output Only] Optional human-readable details for this warning.
393 "code": "A String", # [Output Only] The warning type identifier for this warning.
394 "data": [ # [Output Only] Metadata for this warning in key: value format.
395 {
396 "value": "A String", # [Output Only] A warning data value corresponding to the key.
397 "key": "A String", # [Output Only] A key for the warning data.
398 },
399 ],
400 },
401 ],
402 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
403 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
404 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
405 "name": "A String", # [Output Only] Name of the resource.
406 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
407 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
408 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
409 {
410 "message": "A String", # [Output Only] An optional, human-readable error message.
411 "code": "A String", # [Output Only] The error type identifier for this error.
412 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
413 },
414 ],
415 },
416 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
417 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
418 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
419 }</pre>
420</div>
421
422<div class="method">
423 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
424 <pre>Retrieves the list of instance groups that are located in the specified project and zone.
425
426Args:
427 project: string, The project ID for this request. (required)
428 zone: string, The URL of the zone where the instance group is located. (required)
429 maxResults: integer, Maximum count of results to be returned.
430 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
431 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.
432
433The 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 (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.
434
435For example, filter=name ne example-instance.
436
437Returns:
438 An object of the form:
439
440 { # A list of InstanceGroup resources.
441 "nextPageToken": "A String", # [Output Only] A token that is used to continue a truncated list request.
442 "items": [ # A list of InstanceGroup resources.
443 {
444 "size": 42, # [Output Only] The total number of instances in the instance group.
445 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
446 "description": "A String", # An optional text description for the instance group.
447 "zone": "A String", # The URL of the zone where the instance group is located.
448 "network": "A String", # The URL of the network to which all instances in the instance group belong.
449 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports information. The system uses this fingerprint to detect conflicts when multiple users change the named ports information concurrently.
450 "namedPorts": [ # Assigns a name to a port number. For example: {name: ?http?, port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: ?http?, port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group.
451 { # The named port information. For example: .
452 "name": "A String", # The name for this NamedPort.
453 "port": 42, # The port number, which can be a value between 1 and 65535.
454 },
455 ],
456 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
457 "id": "A String", # [Output Only] A unique identifier for this instance group. The server defines this identifier.
458 "selfLink": "A String", # [Output Only] The URL for this instance group. The server defines this URL.
459 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
460 },
461 ],
462 "kind": "compute#instanceGroupList", # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.
463 "id": "A String", # [Output Only] A unique identifier for this list of instance groups. The server defines this identifier.
464 "selfLink": "A String", # [Output Only] The URL for this instance group. The server defines this URL.
465 }</pre>
466</div>
467
468<div class="method">
469 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body, maxResults=None, pageToken=None, filter=None)</code>
470 <pre>Lists instances in an instance group. The parameters for this method specify whether the list filters instances by state and named ports information.
471
472Args:
473 project: string, The project ID for this request. (required)
474 zone: string, The URL of the zone where the instance group is located. (required)
475 instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required)
476 body: object, The request body. (required)
477 The object takes the form of:
478
479{
480 "instanceState": "A String", # A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes all instances regardless of their state.
481 }
482
483 maxResults: integer, Maximum count of results to be returned.
484 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
485 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.
486
487The 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 (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.
488
489For example, filter=name ne example-instance.
490
491Returns:
492 An object of the form:
493
494 {
495 "nextPageToken": "A String", # [Output Only] A token that is used to continue a truncated list request.
496 "items": [ # A list of InstanceWithNamedPorts resources, which contains all named ports for the given instance.
497 {
498 "status": "A String", # The status of the instance.
499 "instance": "A String", # The URL of the instance.
500 "namedPorts": [ # The named ports that belong to this instance group.
501 { # The named port information. For example: .
502 "name": "A String", # The name for this NamedPort.
503 "port": 42, # The port number, which can be a value between 1 and 65535.
504 },
505 ],
506 },
507 ],
508 "kind": "compute#instanceGroupsListInstances", # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for lists of instance groups.
509 "id": "A String", # [Output Only] A unique identifier for this list of instance groups. The server defines this identifier.
510 "selfLink": "A String", # [Output Only] The URL for this list of instance groups. The server defines this URL.
511 }</pre>
512</div>
513
514<div class="method">
515 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code>
516 <pre>Retrieves the next page of results.
517
518Args:
519 previous_request: The request for the previous page. (required)
520 previous_response: The response from the request for the previous page. (required)
521
522Returns:
523 A request object that you can call 'execute()' on to request the next
524 page. Returns None if there are no more items in the collection.
525 </pre>
526</div>
527
528<div class="method">
529 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
530 <pre>Retrieves the next page of results.
531
532Args:
533 previous_request: The request for the previous page. (required)
534 previous_response: The response from the request for the previous page. (required)
535
536Returns:
537 A request object that you can call 'execute()' on to request the next
538 page. Returns None if there are no more items in the collection.
539 </pre>
540</div>
541
542<div class="method">
543 <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body)</code>
544 <pre>Removes a list of instances from an instance group.
545
546Args:
547 project: string, The project ID for this request. (required)
548 zone: string, The URL of the zone where the instance group is located. (required)
549 instanceGroup: string, The name of the instance group where the specified instances will be removed. (required)
550 body: object, The request body. (required)
551 The object takes the form of:
552
553{
554 "instances": [ # The instances to remove from the instance group.
555 {
556 "instance": "A String",
557 },
558 ],
559 }
560
561
562Returns:
563 An object of the form:
564
565 { # An Operation resource, used to manage asynchronous API requests.
566 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
567 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
568 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
569 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
570 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
571 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
572 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
573 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
574 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
575 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
576 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
577 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
578 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
579 {
580 "message": "A String", # [Output Only] Optional human-readable details for this warning.
581 "code": "A String", # [Output Only] The warning type identifier for this warning.
582 "data": [ # [Output Only] Metadata for this warning in key: value format.
583 {
584 "value": "A String", # [Output Only] A warning data value corresponding to the key.
585 "key": "A String", # [Output Only] A key for the warning data.
586 },
587 ],
588 },
589 ],
590 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
591 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
592 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
593 "name": "A String", # [Output Only] Name of the resource.
594 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
595 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
596 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
597 {
598 "message": "A String", # [Output Only] An optional, human-readable error message.
599 "code": "A String", # [Output Only] The error type identifier for this error.
600 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
601 },
602 ],
603 },
604 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
605 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
606 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
607 }</pre>
608</div>
609
610<div class="method">
611 <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body)</code>
612 <pre>Sets the named ports in an instance group.
613
614Args:
615 project: string, The project ID for this request. (required)
616 zone: string, The URL of the zone where the instance group is located. (required)
617 instanceGroup: string, The name of the instance group where the named ports are updated. (required)
618 body: object, The request body. (required)
619 The object takes the form of:
620
621{
622 "namedPorts": [ # The list of named ports to set for this instance group.
623 { # The named port information. For example: .
624 "name": "A String", # The name for this NamedPort.
625 "port": 42, # The port number, which can be a value between 1 and 65535.
626 },
627 ],
628 "fingerprint": "A String", # The fingerprint of the named ports information, which is a hash of the contents. Use this field for optimistic locking when you update the named ports entries.
629 }
630
631
632Returns:
633 An object of the form:
634
635 { # An Operation resource, used to manage asynchronous API requests.
636 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
637 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
638 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
639 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
640 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
641 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
642 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
643 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
644 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
645 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
646 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
647 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
648 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
649 {
650 "message": "A String", # [Output Only] Optional human-readable details for this warning.
651 "code": "A String", # [Output Only] The warning type identifier for this warning.
652 "data": [ # [Output Only] Metadata for this warning in key: value format.
653 {
654 "value": "A String", # [Output Only] A warning data value corresponding to the key.
655 "key": "A String", # [Output Only] A key for the warning data.
656 },
657 ],
658 },
659 ],
660 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
661 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
662 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
663 "name": "A String", # [Output Only] Name of the resource.
664 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
665 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
666 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
667 {
668 "message": "A String", # [Output Only] An optional, human-readable error message.
669 "code": "A String", # [Output Only] The error type identifier for this error.
670 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
671 },
672 ],
673 },
674 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
675 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
676 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
677 }</pre>
678</div>
679
680</body></html>