blob: 1fe4730579db5b79e3f394686c876007f65928df [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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Retrieves the list of instance groups and sorts them by zone.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="firstline">Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070089<p class="toc_element">
90 <code><a href="#get">get(project, zone, instanceGroup)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070091<p class="firstline">Returns the specified instance group. Get a list of available instance groups by making a list() request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<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">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070096 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070097<p class="firstline">Retrieves the list of instance groups that are located in the specified project and zone.</p>
98<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070099 <code><a href="#listInstances">listInstances(project, zone, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800100<p class="firstline">Lists the instances in the specified instance group.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Removes one or more instances from the specified instance group, but does not delete those instances.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
111 <code><a href="#setNamedPorts">setNamedPorts(project, zone, instanceGroup, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112<p class="firstline">Sets the named ports for the specified instance group.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700113<h3>Method Details</h3>
114<div class="method">
115 <code class="details" id="addInstances">addInstances(project, zone, instanceGroup, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116 <pre>Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
Takashi Matsuo06694102015-09-11 13:55:40 -0700117
118Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800119 project: string, Project ID for this request. (required)
120 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700121 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{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800126 "instances": [ # The list of instances to add to the instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700127 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800128 "instance": "A String", # The URL for a specific instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700129 },
130 ],
131 }
132
133
134Returns:
135 An object of the form:
136
137 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800138 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
139 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400140 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800141 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
142 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
143 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
144 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700145 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800146 "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.
147 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700148 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800149 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
150 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700151 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
152 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800153 "message": "A String", # [Output Only] A human-readable description of the warning code.
154 "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.
155 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
156 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700157 {
158 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700159 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700160 },
161 ],
162 },
163 ],
164 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
166 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700167 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800168 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700169 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
170 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
171 {
172 "message": "A String", # [Output Only] An optional, human-readable error message.
173 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700174 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700175 },
176 ],
177 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800178 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800180 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700181 }</pre>
182</div>
183
184<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700185 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800186 <pre>Retrieves the list of instance groups and sorts them by zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700187
188Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800189 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700190 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
191
192You 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.
193
194Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800196 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.
197 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700198
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800199The 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700200
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700201For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800202
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700203You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800204
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700205To 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700206
207Returns:
208 An object of the form:
209
210 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800211 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700212 "items": { # A map of scoped instance group lists.
213 "a_key": { # The name of the scope that contains this set of instance groups.
214 "warning": { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800215 "message": "A String", # [Output Only] A human-readable description of the warning code.
216 "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.
217 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
218 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700219 {
220 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700221 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700222 },
223 ],
224 },
225 "instanceGroups": [ # [Output Only] The list of instance groups that are contained in this scope.
226 {
227 "size": 42, # [Output Only] The total number of instances in the instance group.
228 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800229 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700230 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700231 "region": "A String", # The URL of the region where the instance group is located (for regional resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700232 "network": "A String", # The URL of the network to which all instances in the instance group belong.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800233 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
234 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
235 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
236 #
237 # 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}]
238 #
239 # Named ports apply to all instances in this instance group.
240 { # The named port. For example: .
241 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
Takashi Matsuo06694102015-09-11 13:55:40 -0700242 "port": 42, # The port number, which can be a value between 1 and 65535.
243 },
244 ],
245 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700246 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800247 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700248 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
249 },
250 ],
251 },
252 },
253 "kind": "compute#instanceGroupAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800254 "id": "A String", # [Output Only] A unique identifier for this aggregated list of instance groups. The server generates this identifier.
255 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700256 }</pre>
257</div>
258
259<div class="method">
260 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
261 <pre>Retrieves the next page of results.
262
263Args:
264 previous_request: The request for the previous page. (required)
265 previous_response: The response from the request for the previous page. (required)
266
267Returns:
268 A request object that you can call 'execute()' on to request the next
269 page. Returns None if there are no more items in the collection.
270 </pre>
271</div>
272
273<div class="method">
274 <code class="details" id="delete">delete(project, zone, instanceGroup)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800275 <pre>Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
Takashi Matsuo06694102015-09-11 13:55:40 -0700276
277Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800278 project: string, Project ID for this request. (required)
279 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700280 instanceGroup: string, The name of the instance group to delete. (required)
281
282Returns:
283 An object of the form:
284
285 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800286 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
287 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400288 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800289 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
290 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
291 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
292 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700293 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800294 "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.
295 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700296 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800297 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
298 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
300 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800301 "message": "A String", # [Output Only] A human-readable description of the warning code.
302 "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.
303 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
304 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700305 {
306 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700307 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700308 },
309 ],
310 },
311 ],
312 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800313 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
314 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700315 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800316 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700317 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
318 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
319 {
320 "message": "A String", # [Output Only] An optional, human-readable error message.
321 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700322 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700323 },
324 ],
325 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800326 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700327 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800328 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700329 }</pre>
330</div>
331
332<div class="method">
333 <code class="details" id="get">get(project, zone, instanceGroup)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700334 <pre>Returns the specified instance group. Get a list of available instance groups by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700335
336Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800337 project: string, Project ID for this request. (required)
338 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700339 instanceGroup: string, The name of the instance group. (required)
340
341Returns:
342 An object of the form:
343
344 {
345 "size": 42, # [Output Only] The total number of instances in the instance group.
346 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800347 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700348 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700349 "region": "A String", # The URL of the region where the instance group is located (for regional resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700350 "network": "A String", # The URL of the network to which all instances in the instance group belong.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800351 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
352 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
353 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
354 #
355 # 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}]
356 #
357 # Named ports apply to all instances in this instance group.
358 { # The named port. For example: .
359 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
Takashi Matsuo06694102015-09-11 13:55:40 -0700360 "port": 42, # The port number, which can be a value between 1 and 65535.
361 },
362 ],
363 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700364 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800365 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700366 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
367 }</pre>
368</div>
369
370<div class="method">
371 <code class="details" id="insert">insert(project, zone, body)</code>
372 <pre>Creates an instance group in the specified project using the parameters that are included in the request.
373
374Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800375 project: string, Project ID for this request. (required)
376 zone: string, The name of the zone where you want to create the instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700377 body: object, The request body. (required)
378 The object takes the form of:
379
380{
381 "size": 42, # [Output Only] The total number of instances in the instance group.
382 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800383 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700384 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700385 "region": "A String", # The URL of the region where the instance group is located (for regional resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700386 "network": "A String", # The URL of the network to which all instances in the instance group belong.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800387 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
388 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
389 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
390 #
391 # 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}]
392 #
393 # Named ports apply to all instances in this instance group.
394 { # The named port. For example: .
395 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
Takashi Matsuo06694102015-09-11 13:55:40 -0700396 "port": 42, # The port number, which can be a value between 1 and 65535.
397 },
398 ],
399 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700400 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800401 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700402 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
403 }
404
405
406Returns:
407 An object of the form:
408
409 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800410 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
411 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400412 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800413 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
414 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
415 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
416 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700417 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800418 "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.
419 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700420 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800421 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
422 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700423 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
424 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800425 "message": "A String", # [Output Only] A human-readable description of the warning code.
426 "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.
427 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
428 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700429 {
430 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700431 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700432 },
433 ],
434 },
435 ],
436 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800437 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
438 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700439 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800440 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700441 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
442 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
443 {
444 "message": "A String", # [Output Only] An optional, human-readable error message.
445 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700446 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700447 },
448 ],
449 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800450 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700451 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800452 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700453 }</pre>
454</div>
455
456<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700457 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700458 <pre>Retrieves the list of instance groups that are located in the specified project and zone.
459
460Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800461 project: string, Project ID for this request. (required)
462 zone: string, The name of the zone where the instance group is located. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700463 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
464
465You 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.
466
467Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400468 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800469 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.
470 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700471
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800472The 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700473
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700474For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800475
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700476You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800477
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700478To 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700479
480Returns:
481 An object of the form:
482
483 { # A list of InstanceGroup resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800484 "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.
485 "items": [ # A list of instance groups.
Takashi Matsuo06694102015-09-11 13:55:40 -0700486 {
487 "size": 42, # [Output Only] The total number of instances in the instance group.
488 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800489 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700490 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700491 "region": "A String", # The URL of the region where the instance group is located (for regional resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700492 "network": "A String", # The URL of the network to which all instances in the instance group belong.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800493 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
494 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
495 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
496 #
497 # 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}]
498 #
499 # Named ports apply to all instances in this instance group.
500 { # The named port. For example: .
501 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
Takashi Matsuo06694102015-09-11 13:55:40 -0700502 "port": 42, # The port number, which can be a value between 1 and 65535.
503 },
504 ],
505 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700506 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800507 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700508 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
509 },
510 ],
511 "kind": "compute#instanceGroupList", # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800512 "id": "A String", # [Output Only] A unique identifier for this list of instance groups. The server generates this identifier.
513 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700514 }</pre>
515</div>
516
517<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700518 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800519 <pre>Lists the instances in the specified instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700520
521Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800522 project: string, Project ID for this request. (required)
523 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700524 instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required)
525 body: object, The request body. (required)
526 The object takes the form of:
527
528{
529 "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.
530 }
531
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700532 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
533
534You 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.
535
536Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400537 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800538 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.
539 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700540
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800541The 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700542
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700543For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800544
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700545You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800546
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700547To 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700548
549Returns:
550 An object of the form:
551
552 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800553 "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.
554 "items": [ # [Output Only] A list of instances and any named ports that are assigned to those instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700555 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800556 "status": "A String", # [Output Only] The status of the instance.
557 "instance": "A String", # [Output Only] The URL of the instance.
558 "namedPorts": [ # [Output Only] The named ports that belong to this instance group.
559 { # The named port. For example: .
560 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
Takashi Matsuo06694102015-09-11 13:55:40 -0700561 "port": 42, # The port number, which can be a value between 1 and 65535.
562 },
563 ],
564 },
565 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700566 "kind": "compute#instanceGroupsListInstances", # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.
567 "id": "A String", # [Output Only] A unique identifier for this list of instances in the specified instance group. The server generates this identifier.
568 "selfLink": "A String", # [Output Only] The URL for this list of instances in the specified instance groups. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700569 }</pre>
570</div>
571
572<div class="method">
573 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code>
574 <pre>Retrieves the next page of results.
575
576Args:
577 previous_request: The request for the previous page. (required)
578 previous_response: The response from the request for the previous page. (required)
579
580Returns:
581 A request object that you can call 'execute()' on to request the next
582 page. Returns None if there are no more items in the collection.
583 </pre>
584</div>
585
586<div class="method">
587 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
588 <pre>Retrieves the next page of results.
589
590Args:
591 previous_request: The request for the previous page. (required)
592 previous_response: The response from the request for the previous page. (required)
593
594Returns:
595 A request object that you can call 'execute()' on to request the next
596 page. Returns None if there are no more items in the collection.
597 </pre>
598</div>
599
600<div class="method">
601 <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800602 <pre>Removes one or more instances from the specified instance group, but does not delete those instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700603
604Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800605 project: string, Project ID for this request. (required)
606 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700607 instanceGroup: string, The name of the instance group where the specified instances will be removed. (required)
608 body: object, The request body. (required)
609 The object takes the form of:
610
611{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800612 "instances": [ # The list of instances to remove from the instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700613 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800614 "instance": "A String", # The URL for a specific instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700615 },
616 ],
617 }
618
619
620Returns:
621 An object of the form:
622
623 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800624 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
625 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400626 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800627 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
628 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
629 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
630 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700631 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800632 "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.
633 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700634 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800635 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
636 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700637 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
638 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800639 "message": "A String", # [Output Only] A human-readable description of the warning code.
640 "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.
641 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
642 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700643 {
644 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700645 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700646 },
647 ],
648 },
649 ],
650 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800651 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
652 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700653 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800654 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700655 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
656 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
657 {
658 "message": "A String", # [Output Only] An optional, human-readable error message.
659 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700660 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700661 },
662 ],
663 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800664 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700665 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800666 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700667 }</pre>
668</div>
669
670<div class="method">
671 <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800672 <pre>Sets the named ports for the specified instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700673
674Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800675 project: string, Project ID for this request. (required)
676 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700677 instanceGroup: string, The name of the instance group where the named ports are updated. (required)
678 body: object, The request body. (required)
679 The object takes the form of:
680
681{
682 "namedPorts": [ # The list of named ports to set for this instance group.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800683 { # The named port. For example: .
684 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
Takashi Matsuo06694102015-09-11 13:55:40 -0700685 "port": 42, # The port number, which can be a value between 1 and 65535.
686 },
687 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800688 "fingerprint": "A String", # The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700689 }
690
691
692Returns:
693 An object of the form:
694
695 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800696 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
697 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400698 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800699 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
700 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
701 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
702 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700703 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800704 "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.
705 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700706 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800707 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
708 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700709 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
710 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800711 "message": "A String", # [Output Only] A human-readable description of the warning code.
712 "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.
713 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
714 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700715 {
716 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700717 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700718 },
719 ],
720 },
721 ],
722 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800723 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
724 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700725 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800726 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700727 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
728 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
729 {
730 "message": "A String", # [Output Only] An optional, human-readable error message.
731 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700732 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700733 },
734 ],
735 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800736 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700737 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800738 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700739 }</pre>
740</div>
741
742</body></html>