1<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.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, requestId=None)</a></code></p>
79<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>
80<p class="toc_element">
81  <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">Retrieves the list of instance groups and sorts them by zone.</p>
83<p class="toc_element">
84  <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87  <code><a href="#delete">delete(project, zone, instanceGroup, requestId=None)</a></code></p>
88<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>
89<p class="toc_element">
90  <code><a href="#get">get(project, zone, instanceGroup)</a></code></p>
91<p class="firstline">Returns the specified instance group. Gets a list of available instance groups by making a list() request.</p>
92<p class="toc_element">
93  <code><a href="#insert">insert(project, zone, body, requestId=None)</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, orderBy=None, 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, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
100<p class="firstline">Lists the instances in the specified instance group.</p>
101<p class="toc_element">
102  <code><a href="#listInstances_next">listInstances_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
105  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
108  <code><a href="#removeInstances">removeInstances(project, zone, instanceGroup, body, requestId=None)</a></code></p>
109<p class="firstline">Removes one or more instances from the specified instance group, but does not delete those instances.</p>
110<p class="toc_element">
111  <code><a href="#setNamedPorts">setNamedPorts(project, zone, instanceGroup, body, requestId=None)</a></code></p>
112<p class="firstline">Sets the named ports for the specified instance group.</p>
113<p class="toc_element">
114  <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<h3>Method Details</h3>
117<div class="method">
118    <code class="details" id="addInstances">addInstances(project, zone, instanceGroup, body, requestId=None)</code>
119  <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.
120
121Args:
122  project: string, Project ID for this request. (required)
123  zone: string, The name of the zone where the instance group is located. (required)
124  instanceGroup: string, The name of the instance group where you are adding instances. (required)
125  body: object, The request body. (required)
126    The object takes the form of:
127
128{
129    "instances": [ # The list of instances to add to the instance group.
130      {
131        "instance": "A String", # The URL for a specific instance.
132      },
133    ],
134  }
135
136  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
137
138For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
139
140The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
141
142Returns:
143  An object of the form:
144
145    { # Represents an Operation resource.
146      #
147      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
148      #
149      # Operations can be global, regional or zonal.
150      # - For global operations, use the globalOperations resource.
151      # - For regional operations, use the regionOperations resource.
152      # - For zonal operations, use the zonalOperations resource.
153      #
154      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
155    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
156    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
157    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
158    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
159    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
160    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
161    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
162    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
163    "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.
164    "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.
165    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
166    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
167    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
168    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
169      {
170        "message": "A String", # [Output Only] A human-readable description of the warning code.
171        "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.
172        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
173            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
174          {
175            "value": "A String", # [Output Only] A warning data value corresponding to the key.
176            "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).
177          },
178        ],
179      },
180    ],
181    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
182    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
183    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
184    "name": "A String", # [Output Only] Name of the resource.
185    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
186    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
187      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
188        {
189          "message": "A String", # [Output Only] An optional, human-readable error message.
190          "code": "A String", # [Output Only] The error type identifier for this error.
191          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
192        },
193      ],
194    },
195    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
196    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
197    "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.
198  }</pre>
199</div>
200
201<div class="method">
202    <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
203  <pre>Retrieves the list of instance groups and sorts them by zone.
204
205Args:
206  project: string, Project ID for this request. (required)
207  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
208
209You 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.
210
211Currently, only sorting by name or creationTimestamp desc is supported.
212  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)
213  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.
214  filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
215
216For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
217
218You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
219
220To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
221
222Returns:
223  An object of the form:
224
225    {
226    "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.
227    "kind": "compute#instanceGroupAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.
228    "items": { # A list of InstanceGroupsScopedList resources.
229      "a_key": { # The name of the scope that contains this set of instance groups.
230        "warning": { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty.
231          "message": "A String", # [Output Only] A human-readable description of the warning code.
232          "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.
233          "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
234              # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
235            {
236              "value": "A String", # [Output Only] A warning data value corresponding to the key.
237              "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).
238            },
239          ],
240        },
241        "instanceGroups": [ # [Output Only] The list of instance groups that are contained in this scope.
242          { # Represents an unmanaged Instance Group resource.
243                #
244                # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read  Instance groups.
245                #
246                # For zonal unmanaged Instance Group, use instanceGroups resource.
247                #
248                # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)
249              "size": 42, # [Output Only] The total number of instances in the instance group.
250              "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
251              "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
252              "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
253              "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
254              "network": "A String", # The URL of the network to which all instances in the instance group belong.
255              "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.
256              "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong.
257              "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
258                  #
259                  # 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}]
260                  #
261                  # Named ports apply to all instances in this instance group.
262                { # The named port. For example: .
263                  "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
264                  "port": 42, # The port number, which can be a value between 1 and 65535.
265                },
266              ],
267              "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
268              "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
269              "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
270              "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
271            },
272        ],
273      },
274    },
275    "warning": { # [Output Only] Informational warning message.
276      "message": "A String", # [Output Only] A human-readable description of the warning code.
277      "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.
278      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
279          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
280        {
281          "value": "A String", # [Output Only] A warning data value corresponding to the key.
282          "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).
283        },
284      ],
285    },
286    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
287    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
288  }</pre>
289</div>
290
291<div class="method">
292    <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
293  <pre>Retrieves the next page of results.
294
295Args:
296  previous_request: The request for the previous page. (required)
297  previous_response: The response from the request for the previous page. (required)
298
299Returns:
300  A request object that you can call 'execute()' on to request the next
301  page. Returns None if there are no more items in the collection.
302    </pre>
303</div>
304
305<div class="method">
306    <code class="details" id="delete">delete(project, zone, instanceGroup, requestId=None)</code>
307  <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.
308
309Args:
310  project: string, Project ID for this request. (required)
311  zone: string, The name of the zone where the instance group is located. (required)
312  instanceGroup: string, The name of the instance group to delete. (required)
313  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
314
315For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
316
317The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
318
319Returns:
320  An object of the form:
321
322    { # Represents an Operation resource.
323      #
324      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
325      #
326      # Operations can be global, regional or zonal.
327      # - For global operations, use the globalOperations resource.
328      # - For regional operations, use the regionOperations resource.
329      # - For zonal operations, use the zonalOperations resource.
330      #
331      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
332    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
333    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
334    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
335    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
336    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
337    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
338    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
339    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
340    "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.
341    "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.
342    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
343    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
344    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
345    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
346      {
347        "message": "A String", # [Output Only] A human-readable description of the warning code.
348        "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.
349        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
350            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
351          {
352            "value": "A String", # [Output Only] A warning data value corresponding to the key.
353            "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).
354          },
355        ],
356      },
357    ],
358    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
359    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
360    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
361    "name": "A String", # [Output Only] Name of the resource.
362    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
363    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
364      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
365        {
366          "message": "A String", # [Output Only] An optional, human-readable error message.
367          "code": "A String", # [Output Only] The error type identifier for this error.
368          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
369        },
370      ],
371    },
372    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
373    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
374    "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.
375  }</pre>
376</div>
377
378<div class="method">
379    <code class="details" id="get">get(project, zone, instanceGroup)</code>
380  <pre>Returns the specified instance group. Gets a list of available instance groups by making a list() request.
381
382Args:
383  project: string, Project ID for this request. (required)
384  zone: string, The name of the zone where the instance group is located. (required)
385  instanceGroup: string, The name of the instance group. (required)
386
387Returns:
388  An object of the form:
389
390    { # Represents an unmanaged Instance Group resource.
391        #
392        # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read  Instance groups.
393        #
394        # For zonal unmanaged Instance Group, use instanceGroups resource.
395        #
396        # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)
397      "size": 42, # [Output Only] The total number of instances in the instance group.
398      "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
399      "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
400      "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
401      "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
402      "network": "A String", # The URL of the network to which all instances in the instance group belong.
403      "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.
404      "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong.
405      "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
406          #
407          # 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}]
408          #
409          # Named ports apply to all instances in this instance group.
410        { # The named port. For example: .
411          "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
412          "port": 42, # The port number, which can be a value between 1 and 65535.
413        },
414      ],
415      "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
416      "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
417      "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
418      "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
419    }</pre>
420</div>
421
422<div class="method">
423    <code class="details" id="insert">insert(project, zone, body, requestId=None)</code>
424  <pre>Creates an instance group in the specified project using the parameters that are included in the request.
425
426Args:
427  project: string, Project ID for this request. (required)
428  zone: string, The name of the zone where you want to create the instance group. (required)
429  body: object, The request body. (required)
430    The object takes the form of:
431
432{ # Represents an unmanaged Instance Group resource.
433      #
434      # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read  Instance groups.
435      #
436      # For zonal unmanaged Instance Group, use instanceGroups resource.
437      #
438      # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)
439    "size": 42, # [Output Only] The total number of instances in the instance group.
440    "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
441    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
442    "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
443    "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
444    "network": "A String", # The URL of the network to which all instances in the instance group belong.
445    "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.
446    "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong.
447    "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
448        #
449        # 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}]
450        #
451        # Named ports apply to all instances in this instance group.
452      { # The named port. For example: .
453        "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
454        "port": 42, # The port number, which can be a value between 1 and 65535.
455      },
456    ],
457    "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
458    "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
459    "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
460    "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
461  }
462
463  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
464
465For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
466
467The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
468
469Returns:
470  An object of the form:
471
472    { # Represents an Operation resource.
473      #
474      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
475      #
476      # Operations can be global, regional or zonal.
477      # - For global operations, use the globalOperations resource.
478      # - For regional operations, use the regionOperations resource.
479      # - For zonal operations, use the zonalOperations resource.
480      #
481      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
482    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
483    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
484    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
485    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
486    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
487    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
488    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
489    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
490    "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.
491    "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.
492    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
493    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
494    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
495    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
496      {
497        "message": "A String", # [Output Only] A human-readable description of the warning code.
498        "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.
499        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
500            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
501          {
502            "value": "A String", # [Output Only] A warning data value corresponding to the key.
503            "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).
504          },
505        ],
506      },
507    ],
508    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
509    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
510    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
511    "name": "A String", # [Output Only] Name of the resource.
512    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
513    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
514      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
515        {
516          "message": "A String", # [Output Only] An optional, human-readable error message.
517          "code": "A String", # [Output Only] The error type identifier for this error.
518          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
519        },
520      ],
521    },
522    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
523    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
524    "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.
525  }</pre>
526</div>
527
528<div class="method">
529    <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
530  <pre>Retrieves the list of instance groups that are located in the specified project and zone.
531
532Args:
533  project: string, Project ID for this request. (required)
534  zone: string, The name of the zone where the instance group is located. (required)
535  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
536
537You 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.
538
539Currently, only sorting by name or creationTimestamp desc is supported.
540  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)
541  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.
542  filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
543
544For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
545
546You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
547
548To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
549
550Returns:
551  An object of the form:
552
553    { # A list of InstanceGroup resources.
554    "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.
555    "kind": "compute#instanceGroupList", # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.
556    "items": [ # A list of InstanceGroup resources.
557      { # Represents an unmanaged Instance Group resource.
558            #
559            # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read  Instance groups.
560            #
561            # For zonal unmanaged Instance Group, use instanceGroups resource.
562            #
563            # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)
564          "size": 42, # [Output Only] The total number of instances in the instance group.
565          "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
566          "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
567          "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
568          "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
569          "network": "A String", # The URL of the network to which all instances in the instance group belong.
570          "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.
571          "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong.
572          "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
573              #
574              # 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}]
575              #
576              # Named ports apply to all instances in this instance group.
577            { # The named port. For example: .
578              "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
579              "port": 42, # The port number, which can be a value between 1 and 65535.
580            },
581          ],
582          "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
583          "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
584          "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
585          "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
586        },
587    ],
588    "warning": { # [Output Only] Informational warning message.
589      "message": "A String", # [Output Only] A human-readable description of the warning code.
590      "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.
591      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
592          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
593        {
594          "value": "A String", # [Output Only] A warning data value corresponding to the key.
595          "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).
596        },
597      ],
598    },
599    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
600    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
601  }</pre>
602</div>
603
604<div class="method">
605    <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
606  <pre>Lists the instances in the specified instance group.
607
608Args:
609  project: string, Project ID for this request. (required)
610  zone: string, The name of the zone where the instance group is located. (required)
611  instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required)
612  body: object, The request body. (required)
613    The object takes the form of:
614
615{
616    "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.
617  }
618
619  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
620
621You 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.
622
623Currently, only sorting by name or creationTimestamp desc is supported.
624  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)
625  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.
626  filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
627
628For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
629
630You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
631
632To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
633
634Returns:
635  An object of the form:
636
637    {
638    "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.
639    "kind": "compute#instanceGroupsListInstances", # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.
640    "items": [ # A list of InstanceWithNamedPorts resources.
641      {
642        "status": "A String", # [Output Only] The status of the instance.
643        "instance": "A String", # [Output Only] The URL of the instance.
644        "namedPorts": [ # [Output Only] The named ports that belong to this instance group.
645          { # The named port. For example: .
646            "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
647            "port": 42, # The port number, which can be a value between 1 and 65535.
648          },
649        ],
650      },
651    ],
652    "warning": { # [Output Only] Informational warning message.
653      "message": "A String", # [Output Only] A human-readable description of the warning code.
654      "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.
655      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
656          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
657        {
658          "value": "A String", # [Output Only] A warning data value corresponding to the key.
659          "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).
660        },
661      ],
662    },
663    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
664    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
665  }</pre>
666</div>
667
668<div class="method">
669    <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code>
670  <pre>Retrieves the next page of results.
671
672Args:
673  previous_request: The request for the previous page. (required)
674  previous_response: The response from the request for the previous page. (required)
675
676Returns:
677  A request object that you can call 'execute()' on to request the next
678  page. Returns None if there are no more items in the collection.
679    </pre>
680</div>
681
682<div class="method">
683    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
684  <pre>Retrieves the next page of results.
685
686Args:
687  previous_request: The request for the previous page. (required)
688  previous_response: The response from the request for the previous page. (required)
689
690Returns:
691  A request object that you can call 'execute()' on to request the next
692  page. Returns None if there are no more items in the collection.
693    </pre>
694</div>
695
696<div class="method">
697    <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body, requestId=None)</code>
698  <pre>Removes one or more instances from the specified instance group, but does not delete those instances.
699
700If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
701
702Args:
703  project: string, Project ID for this request. (required)
704  zone: string, The name of the zone where the instance group is located. (required)
705  instanceGroup: string, The name of the instance group where the specified instances will be removed. (required)
706  body: object, The request body. (required)
707    The object takes the form of:
708
709{
710    "instances": [ # The list of instances to remove from the instance group.
711      {
712        "instance": "A String", # The URL for a specific instance.
713      },
714    ],
715  }
716
717  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
718
719For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
720
721The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
722
723Returns:
724  An object of the form:
725
726    { # Represents an Operation resource.
727      #
728      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
729      #
730      # Operations can be global, regional or zonal.
731      # - For global operations, use the globalOperations resource.
732      # - For regional operations, use the regionOperations resource.
733      # - For zonal operations, use the zonalOperations resource.
734      #
735      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
736    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
737    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
738    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
739    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
740    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
741    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
742    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
743    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
744    "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.
745    "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.
746    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
747    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
748    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
749    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
750      {
751        "message": "A String", # [Output Only] A human-readable description of the warning code.
752        "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.
753        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
754            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
755          {
756            "value": "A String", # [Output Only] A warning data value corresponding to the key.
757            "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).
758          },
759        ],
760      },
761    ],
762    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
763    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
764    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
765    "name": "A String", # [Output Only] Name of the resource.
766    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
767    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
768      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
769        {
770          "message": "A String", # [Output Only] An optional, human-readable error message.
771          "code": "A String", # [Output Only] The error type identifier for this error.
772          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
773        },
774      ],
775    },
776    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
777    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
778    "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.
779  }</pre>
780</div>
781
782<div class="method">
783    <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body, requestId=None)</code>
784  <pre>Sets the named ports for the specified instance group.
785
786Args:
787  project: string, Project ID for this request. (required)
788  zone: string, The name of the zone where the instance group is located. (required)
789  instanceGroup: string, The name of the instance group where the named ports are updated. (required)
790  body: object, The request body. (required)
791    The object takes the form of:
792
793{
794    "namedPorts": [ # The list of named ports to set for this instance group.
795      { # The named port. For example: .
796        "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
797        "port": 42, # The port number, which can be a value between 1 and 65535.
798      },
799    ],
800    "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. A request with an incorrect fingerprint will fail with error 412 conditionNotMet.
801  }
802
803  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
804
805For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
806
807The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
808
809Returns:
810  An object of the form:
811
812    { # Represents an Operation resource.
813      #
814      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
815      #
816      # Operations can be global, regional or zonal.
817      # - For global operations, use the globalOperations resource.
818      # - For regional operations, use the regionOperations resource.
819      # - For zonal operations, use the zonalOperations resource.
820      #
821      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
822    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
823    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
824    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
825    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
826    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
827    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
828    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
829    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
830    "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.
831    "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.
832    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
833    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
834    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
835    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
836      {
837        "message": "A String", # [Output Only] A human-readable description of the warning code.
838        "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.
839        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
840            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
841          {
842            "value": "A String", # [Output Only] A warning data value corresponding to the key.
843            "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).
844          },
845        ],
846      },
847    ],
848    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
849    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
850    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
851    "name": "A String", # [Output Only] Name of the resource.
852    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
853    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
854      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
855        {
856          "message": "A String", # [Output Only] An optional, human-readable error message.
857          "code": "A String", # [Output Only] The error type identifier for this error.
858          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
859        },
860      ],
861    },
862    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
863    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
864    "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.
865  }</pre>
866</div>
867
868<div class="method">
869    <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
870  <pre>Returns permissions that a caller has on the specified resource.
871
872Args:
873  project: string, Project ID for this request. (required)
874  zone: string, The name of the zone for this request. (required)
875  resource: string, Name or id of the resource for this request. (required)
876  body: object, The request body. (required)
877    The object takes the form of:
878
879{
880    "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
881      "A String",
882    ],
883  }
884
885
886Returns:
887  An object of the form:
888
889    {
890    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
891      "A String",
892    ],
893  }</pre>
894</div>
895
896</body></html>