blob: 6710238e357f84538dbecc9e6b7d80af15356e93 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.regionInstanceGroups.html">regionInstanceGroups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#get">get(project, region, instanceGroup)</a></code></p>
79<p class="firstline">Returns the specified instance group resource.</p>
80<p class="toc_element">
81 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">Retrieves the list of instance group resources contained within the specified region.</p>
83<p class="toc_element">
84 <code><a href="#listInstances">listInstances(project, region, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
85<p class="firstline">Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.</p>
86<p class="toc_element">
87 <code><a href="#listInstances_next">listInstances_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#setNamedPorts">setNamedPorts(project, region, instanceGroup, body)</a></code></p>
94<p class="firstline">Sets the named ports for the specified regional instance group.</p>
95<p class="toc_element">
96 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
97<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="get">get(project, region, instanceGroup)</code>
101 <pre>Returns the specified instance group resource.
102
103Args:
104 project: string, Project ID for this request. (required)
105 region: string, Name of the region scoping this request. (required)
106 instanceGroup: string, Name of the instance group resource to return. (required)
107
108Returns:
109 An object of the form:
110
111 {
112 "size": 42, # [Output Only] The total number of instances in the instance group.
113 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
114 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
115 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
116 "region": "A String", # The URL of the region where the instance group is located (for regional resources).
117 "network": "A String", # The URL of the network to which all instances in the instance group belong.
118 "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.
119 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
120 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
121 #
122 # 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}]
123 #
124 # Named ports apply to all instances in this instance group.
125 { # The named port. For example: .
126 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
127 "port": 42, # The port number, which can be a value between 1 and 65535.
128 },
129 ],
130 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
131 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
132 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
133 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
134 }</pre>
135</div>
136
137<div class="method">
138 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
139 <pre>Retrieves the list of instance group resources contained within the specified region.
140
141Args:
142 project: string, Project ID for this request. (required)
143 region: string, Name of the region scoping this request. (required)
144 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
145
146You 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.
147
148Currently, only sorting by name or creationTimestamp desc is supported.
149 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.
150 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.
151 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.
152
153The 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.
154
155For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
156
157You 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.
158
159To 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.
160
161Returns:
162 An object of the form:
163
164 { # Contains a list of InstanceGroup resources.
165 "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.
166 "items": [ # A list of InstanceGroup resources.
167 {
168 "size": 42, # [Output Only] The total number of instances in the instance group.
169 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
170 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
171 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
172 "region": "A String", # The URL of the region where the instance group is located (for regional resources).
173 "network": "A String", # The URL of the network to which all instances in the instance group belong.
174 "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.
175 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong.
176 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
177 #
178 # 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}]
179 #
180 # Named ports apply to all instances in this instance group.
181 { # The named port. For example: .
182 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
183 "port": 42, # The port number, which can be a value between 1 and 65535.
184 },
185 ],
186 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
187 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
188 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
189 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
190 },
191 ],
192 "kind": "compute#regionInstanceGroupList", # The resource type.
193 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
194 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
195 }</pre>
196</div>
197
198<div class="method">
199 <code class="details" id="listInstances">listInstances(project, region, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
200 <pre>Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.
201
202Args:
203 project: string, Project ID for this request. (required)
204 region: string, Name of the region scoping this request. (required)
205 instanceGroup: string, Name of the regional instance group for which we want to list the instances. (required)
206 body: object, The request body. (required)
207 The object takes the form of:
208
209{
210 "portName": "A String", # Name of port user is interested in. It is optional. If it is set, only information about this ports will be returned. If it is not set, all the named ports will be returned. Always lists all instances.
211 "instanceState": "A String", # Instances in which state should be returned. Valid options are: 'ALL', 'RUNNING'. By default, it lists all instances.
212 }
213
214 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
215
216You 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.
217
218Currently, only sorting by name or creationTimestamp desc is supported.
219 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.
220 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.
221 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.
222
223The 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.
224
225For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
226
227You 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.
228
229To 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.
230
231Returns:
232 An object of the form:
233
234 {
235 "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.
236 "items": [ # A list of instances and any named ports that are assigned to those instances.
237 {
238 "status": "A String", # [Output Only] The status of the instance.
239 "instance": "A String", # [Output Only] The URL of the instance.
240 "namedPorts": [ # [Output Only] The named ports that belong to this instance group.
241 { # The named port. For example: .
242 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
243 "port": 42, # The port number, which can be a value between 1 and 65535.
244 },
245 ],
246 },
247 ],
248 "kind": "compute#regionInstanceGroupsListInstances", # The resource type.
249 "id": "A String", # [Output Only] Unique identifier for the resource. Defined by the server.
250 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
251 }</pre>
252</div>
253
254<div class="method">
255 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code>
256 <pre>Retrieves the next page of results.
257
258Args:
259 previous_request: The request for the previous page. (required)
260 previous_response: The response from the request for the previous page. (required)
261
262Returns:
263 A request object that you can call 'execute()' on to request the next
264 page. Returns None if there are no more items in the collection.
265 </pre>
266</div>
267
268<div class="method">
269 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
270 <pre>Retrieves the next page of results.
271
272Args:
273 previous_request: The request for the previous page. (required)
274 previous_response: The response from the request for the previous page. (required)
275
276Returns:
277 A request object that you can call 'execute()' on to request the next
278 page. Returns None if there are no more items in the collection.
279 </pre>
280</div>
281
282<div class="method">
283 <code class="details" id="setNamedPorts">setNamedPorts(project, region, instanceGroup, body)</code>
284 <pre>Sets the named ports for the specified regional instance group.
285
286Args:
287 project: string, Project ID for this request. (required)
288 region: string, Name of the region scoping this request. (required)
289 instanceGroup: string, The name of the regional instance group where the named ports are updated. (required)
290 body: object, The request body. (required)
291 The object takes the form of:
292
293{
294 "namedPorts": [ # The list of named ports to set for this instance group.
295 { # The named port. For example: .
296 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
297 "port": 42, # The port number, which can be a value between 1 and 65535.
298 },
299 ],
300 "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.
301 }
302
303
304Returns:
305 An object of the form:
306
307 { # An Operation resource, used to manage asynchronous API requests.
308 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
309 "clientOperationId": "A String", # [Output Only] Reserved for future use.
310 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
311 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
312 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
313 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
314 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
315 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
316 "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.
317 "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.
318 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
319 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
320 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
321 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
322 {
323 "message": "A String", # [Output Only] A human-readable description of the warning code.
324 "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.
325 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
326 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
327 {
328 "value": "A String", # [Output Only] A warning data value corresponding to the key.
329 "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).
330 },
331 ],
332 },
333 ],
334 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
335 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
336 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
337 "name": "A String", # [Output Only] Name of the resource.
338 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
339 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
340 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
341 {
342 "message": "A String", # [Output Only] An optional, human-readable error message.
343 "code": "A String", # [Output Only] The error type identifier for this error.
344 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
345 },
346 ],
347 },
348 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
349 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
350 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
351 }</pre>
352</div>
353
354<div class="method">
355 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
356 <pre>Returns permissions that a caller has on the specified resource.
357
358Args:
359 project: string, Project ID for this request. (required)
360 region: string, The name of the region for this request. (required)
361 resource: string, Name of the resource for this request. (required)
362 body: object, The request body. (required)
363 The object takes the form of:
364
365{
366 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
367 "A String",
368 ],
369 }
370
371
372Returns:
373 An object of the form:
374
375 {
376 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
377 "A String",
378 ],
379 }</pre>
380</div>
381
382</body></html>