blob: de4935eb9fbd5cb4024e4902c807795cfb222314 [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">
81 <code><a href="#aggregatedList">aggregatedList(project, 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>
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>
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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700140 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
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 Parrott36e41bc2016-02-19 16:02:29 -0800159 "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.
174 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
175 },
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 Parrott36e41bc2016-02-19 16:02:29 -0800180 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
Takashi Matsuo06694102015-09-11 13:55:40 -0700181 }</pre>
182</div>
183
184<div class="method">
185 <code class="details" id="aggregatedList">aggregatedList(project, 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)
190 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.
191 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.
192 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 -0700193
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800194The 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 -0700195
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800196For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance.
197
198Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.
199
200The Beta API also supports filtering on multiple expressions by providing 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 -0700201
202Returns:
203 An object of the form:
204
205 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800206 "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 -0700207 "items": { # A map of scoped instance group lists.
208 "a_key": { # The name of the scope that contains this set of instance groups.
209 "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 -0800210 "message": "A String", # [Output Only] A human-readable description of the warning code.
211 "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.
212 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
213 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700214 {
215 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800216 "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 -0700217 },
218 ],
219 },
220 "instanceGroups": [ # [Output Only] The list of instance groups that are contained in this scope.
221 {
222 "size": 42, # [Output Only] The total number of instances in the instance group.
223 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800224 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
225 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located.
Takashi Matsuo06694102015-09-11 13:55:40 -0700226 "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 -0800227 "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.
228 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
229 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
230 #
231 # 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}]
232 #
233 # Named ports apply to all instances in this instance group.
234 { # The named port. For example: .
235 "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 -0700236 "port": 42, # The port number, which can be a value between 1 and 65535.
237 },
238 ],
239 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800240 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
241 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700242 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
243 },
244 ],
245 },
246 },
247 "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 -0800248 "id": "A String", # [Output Only] A unique identifier for this aggregated list of instance groups. The server generates this identifier.
249 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700250 }</pre>
251</div>
252
253<div class="method">
254 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
255 <pre>Retrieves the next page of results.
256
257Args:
258 previous_request: The request for the previous page. (required)
259 previous_response: The response from the request for the previous page. (required)
260
261Returns:
262 A request object that you can call 'execute()' on to request the next
263 page. Returns None if there are no more items in the collection.
264 </pre>
265</div>
266
267<div class="method">
268 <code class="details" id="delete">delete(project, zone, instanceGroup)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800269 <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 -0700270
271Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800272 project: string, Project ID for this request. (required)
273 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700274 instanceGroup: string, The name of the instance group to delete. (required)
275
276Returns:
277 An object of the form:
278
279 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800280 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
281 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700282 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800283 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
284 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
285 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
286 "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 -0700287 "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 -0800288 "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.
289 "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 -0700290 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800291 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
292 "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 -0700293 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
294 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800295 "message": "A String", # [Output Only] A human-readable description of the warning code.
296 "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.
297 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
298 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 {
300 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800301 "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 -0700302 },
303 ],
304 },
305 ],
306 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800307 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
308 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700309 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800310 "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 -0700311 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
312 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
313 {
314 "message": "A String", # [Output Only] An optional, human-readable error message.
315 "code": "A String", # [Output Only] The error type identifier for this error.
316 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
317 },
318 ],
319 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800320 "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 -0700321 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800322 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
Takashi Matsuo06694102015-09-11 13:55:40 -0700323 }</pre>
324</div>
325
326<div class="method">
327 <code class="details" id="get">get(project, zone, instanceGroup)</code>
328 <pre>Returns the specified instance group resource.
329
330Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800331 project: string, Project ID for this request. (required)
332 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700333 instanceGroup: string, The name of the instance group. (required)
334
335Returns:
336 An object of the form:
337
338 {
339 "size": 42, # [Output Only] The total number of instances in the instance group.
340 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800341 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
342 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located.
Takashi Matsuo06694102015-09-11 13:55:40 -0700343 "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 -0800344 "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.
345 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
346 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
347 #
348 # 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}]
349 #
350 # Named ports apply to all instances in this instance group.
351 { # The named port. For example: .
352 "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 -0700353 "port": 42, # The port number, which can be a value between 1 and 65535.
354 },
355 ],
356 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800357 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
358 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700359 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
360 }</pre>
361</div>
362
363<div class="method">
364 <code class="details" id="insert">insert(project, zone, body)</code>
365 <pre>Creates an instance group in the specified project using the parameters that are included in the request.
366
367Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800368 project: string, Project ID for this request. (required)
369 zone: string, The name of the zone where you want to create the instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700370 body: object, The request body. (required)
371 The object takes the form of:
372
373{
374 "size": 42, # [Output Only] The total number of instances in the instance group.
375 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800376 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
377 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located.
Takashi Matsuo06694102015-09-11 13:55:40 -0700378 "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 -0800379 "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.
380 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
381 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
382 #
383 # 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}]
384 #
385 # Named ports apply to all instances in this instance group.
386 { # The named port. For example: .
387 "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 -0700388 "port": 42, # The port number, which can be a value between 1 and 65535.
389 },
390 ],
391 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800392 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
393 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700394 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
395 }
396
397
398Returns:
399 An object of the form:
400
401 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800402 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
403 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700404 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800405 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
406 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
407 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
408 "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 -0700409 "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 -0800410 "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.
411 "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 -0700412 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800413 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
414 "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 -0700415 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
416 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800417 "message": "A String", # [Output Only] A human-readable description of the warning code.
418 "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.
419 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
420 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700421 {
422 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800423 "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 -0700424 },
425 ],
426 },
427 ],
428 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800429 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
430 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700431 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800432 "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 -0700433 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
434 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
435 {
436 "message": "A String", # [Output Only] An optional, human-readable error message.
437 "code": "A String", # [Output Only] The error type identifier for this error.
438 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
439 },
440 ],
441 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800442 "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 -0700443 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800444 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
Takashi Matsuo06694102015-09-11 13:55:40 -0700445 }</pre>
446</div>
447
448<div class="method">
449 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
450 <pre>Retrieves the list of instance groups that are located in the specified project and zone.
451
452Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800453 project: string, Project ID for this request. (required)
454 zone: string, The name of the zone where the instance group is located. (required)
455 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.
456 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.
457 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 -0700458
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800459The 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 -0700460
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800461For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance.
462
463Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.
464
465The Beta API also supports filtering on multiple expressions by providing 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 -0700466
467Returns:
468 An object of the form:
469
470 { # A list of InstanceGroup resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800471 "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.
472 "items": [ # A list of instance groups.
Takashi Matsuo06694102015-09-11 13:55:40 -0700473 {
474 "size": 42, # [Output Only] The total number of instances in the instance group.
475 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800476 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
477 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located.
Takashi Matsuo06694102015-09-11 13:55:40 -0700478 "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 -0800479 "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.
480 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
481 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
482 #
483 # 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}]
484 #
485 # Named ports apply to all instances in this instance group.
486 { # The named port. For example: .
487 "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 -0700488 "port": 42, # The port number, which can be a value between 1 and 65535.
489 },
490 ],
491 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800492 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
493 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700494 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
495 },
496 ],
497 "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 -0800498 "id": "A String", # [Output Only] A unique identifier for this list of instance groups. The server generates this identifier.
499 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700500 }</pre>
501</div>
502
503<div class="method">
504 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800505 <pre>Lists the instances in the specified instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700506
507Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800508 project: string, Project ID for this request. (required)
509 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700510 instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required)
511 body: object, The request body. (required)
512 The object takes the form of:
513
514{
515 "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.
516 }
517
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800518 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.
519 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.
520 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 -0700521
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800522The 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 -0700523
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance.
525
526Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.
527
528The Beta API also supports filtering on multiple expressions by providing 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 -0700529
530Returns:
531 An object of the form:
532
533 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800534 "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.
535 "items": [ # [Output Only] A list of instances and any named ports that are assigned to those instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700536 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800537 "status": "A String", # [Output Only] The status of the instance.
538 "instance": "A String", # [Output Only] The URL of the instance.
539 "namedPorts": [ # [Output Only] The named ports that belong to this instance group.
540 { # The named port. For example: .
541 "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 -0700542 "port": 42, # The port number, which can be a value between 1 and 65535.
543 },
544 ],
545 },
546 ],
547 "kind": "compute#instanceGroupsListInstances", # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for lists of instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800548 "id": "A String", # [Output Only] A unique identifier for this list of instance groups. The server generates this identifier.
549 "selfLink": "A String", # [Output Only] The URL for this list of instance groups. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700550 }</pre>
551</div>
552
553<div class="method">
554 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code>
555 <pre>Retrieves the next page of results.
556
557Args:
558 previous_request: The request for the previous page. (required)
559 previous_response: The response from the request for the previous page. (required)
560
561Returns:
562 A request object that you can call 'execute()' on to request the next
563 page. Returns None if there are no more items in the collection.
564 </pre>
565</div>
566
567<div class="method">
568 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
569 <pre>Retrieves the next page of results.
570
571Args:
572 previous_request: The request for the previous page. (required)
573 previous_response: The response from the request for the previous page. (required)
574
575Returns:
576 A request object that you can call 'execute()' on to request the next
577 page. Returns None if there are no more items in the collection.
578 </pre>
579</div>
580
581<div class="method">
582 <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800583 <pre>Removes one or more instances from the specified instance group, but does not delete those instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700584
585Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800586 project: string, Project ID for this request. (required)
587 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700588 instanceGroup: string, The name of the instance group where the specified instances will be removed. (required)
589 body: object, The request body. (required)
590 The object takes the form of:
591
592{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800593 "instances": [ # The list of instances to remove from the instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700594 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800595 "instance": "A String", # The URL for a specific instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700596 },
597 ],
598 }
599
600
601Returns:
602 An object of the form:
603
604 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800605 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
606 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700607 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800608 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
609 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
610 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
611 "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 -0700612 "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 -0800613 "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.
614 "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 -0700615 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800616 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
617 "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 -0700618 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
619 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800620 "message": "A String", # [Output Only] A human-readable description of the warning code.
621 "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.
622 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
623 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700624 {
625 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800626 "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 -0700627 },
628 ],
629 },
630 ],
631 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800632 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
633 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700634 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800635 "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 -0700636 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
637 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
638 {
639 "message": "A String", # [Output Only] An optional, human-readable error message.
640 "code": "A String", # [Output Only] The error type identifier for this error.
641 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
642 },
643 ],
644 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800645 "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 -0700646 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800647 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
Takashi Matsuo06694102015-09-11 13:55:40 -0700648 }</pre>
649</div>
650
651<div class="method">
652 <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800653 <pre>Sets the named ports for the specified instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700654
655Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800656 project: string, Project ID for this request. (required)
657 zone: string, The name of the zone where the instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700658 instanceGroup: string, The name of the instance group where the named ports are updated. (required)
659 body: object, The request body. (required)
660 The object takes the form of:
661
662{
663 "namedPorts": [ # The list of named ports to set for this instance group.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800664 { # The named port. For example: .
665 "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 -0700666 "port": 42, # The port number, which can be a value between 1 and 65535.
667 },
668 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800669 "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 -0700670 }
671
672
673Returns:
674 An object of the form:
675
676 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800677 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
678 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700679 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800680 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
681 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
682 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
683 "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 -0700684 "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 -0800685 "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.
686 "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 -0700687 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800688 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
689 "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 -0700690 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
691 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800692 "message": "A String", # [Output Only] A human-readable description of the warning code.
693 "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.
694 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
695 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700696 {
697 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800698 "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 -0700699 },
700 ],
701 },
702 ],
703 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800704 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
705 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700706 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800707 "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 -0700708 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
709 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
710 {
711 "message": "A String", # [Output Only] An optional, human-readable error message.
712 "code": "A String", # [Output Only] The error type identifier for this error.
713 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
714 },
715 ],
716 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800717 "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 -0700718 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800719 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
Takashi Matsuo06694102015-09-11 13:55:40 -0700720 }</pre>
721</div>
722
723</body></html>