blob: 64c5b105277507af5728568c4aef6d3221c2a680 [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.instanceGroups.html">instanceGroups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addInstances">addInstances(project, zone, instanceGroup, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<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">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, zone, instanceGroup, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Returns the specified instance group. Gets a list of available instance groups by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<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">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Retrieves the list of instance groups that are located in the specified project and zone.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#listInstances">listInstances(project, zone, instanceGroup, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700100<p class="firstline">Lists the instances in the specified instance group. The orderBy query parameter is not supported.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<p class="toc_element">
102 <code><a href="#listInstances_next">listInstances_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#removeInstances">removeInstances(project, zone, instanceGroup, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#setNamedPorts">setNamedPorts(project, zone, instanceGroup, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Sets the named ports for the specified instance group.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="addInstances">addInstances(project, zone, instanceGroup, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700119 <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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700126 The object takes the form of:
127
128{
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;instances&quot;: [ # The list of instances to add to the instance group.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 &quot;instance&quot;: &quot;A String&quot;, # The URL for a specific instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700132 },
133 ],
134 }
135
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136 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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700141
142Returns:
143 An object of the form:
144
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 { # Represents an Operation resource.
146 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 # Google Compute Engine has three Operation resources:
148 #
149 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
150 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
152 #
153 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 # - For global operations, use the `globalOperations` resource.
155 # - For regional operations, use the `regionOperations` resource.
156 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700158 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
160 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
161 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
162 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
163 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
164 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700165 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
167 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
168 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169 },
170 ],
171 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
173 &quot;httpErrorStatusCode&quot;: 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.
174 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
175 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
176 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
177 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
178 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
179 &quot;progress&quot;: 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.
180 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
181 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
182 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
183 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
184 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
185 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
186 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
187 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
188 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
189 {
190 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
191 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
192 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
193 {
194 &quot;key&quot;: &quot;A String&quot;, # [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).
195 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
196 },
197 ],
198 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
199 },
200 ],
201 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700202 }</pre>
203</div>
204
205<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700207 <pre>Retrieves the list of instance groups and sorts them by zone.
208
209Args:
210 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 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 `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700212
Dan O'Mearadd494642020-05-01 07:42:23 -0700213For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700214
Dan O'Mearadd494642020-05-01 07:42:23 -0700215You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700216
Bu Sun Kim65020912020-05-20 12:08:20 -0700217To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700218 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 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`)
220 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
221
222You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
223
224Currently, only sorting by `name` or `creationTimestamp desc` is supported.
225 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700226
227Returns:
228 An object of the form:
229
230 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
232 &quot;items&quot;: { # A list of InstanceGroupsScopedList resources.
233 &quot;a_key&quot;: { # The name of the scope that contains this set of instance groups.
234 &quot;instanceGroups&quot;: [ # [Output Only] The list of instance groups that are contained in this scope.
235 { # Represents an Instance Group resource.
236 #
237 # Instance Groups can be used to configure a target for load balancing.
238 #
239 # Instance groups can either be managed or unmanaged.
240 #
241 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
242 #
243 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
244 #
245 # For more information, read Instance groups.
246 #
247 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
248 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
249 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
250 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
251 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
252 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
253 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
254 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
255 #
256 # 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: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
257 #
258 # Named ports apply to all instances in this instance group.
259 { # The named port. For example: .
260 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
261 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
262 },
263 ],
264 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
265 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
266 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
267 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
268 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
269 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
270 },
271 ],
272 &quot;warning&quot;: { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty.
273 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
274 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
275 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700276 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 &quot;key&quot;: &quot;A String&quot;, # [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).
278 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700279 },
280 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700282 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700283 },
284 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;kind&quot;: &quot;compute#instanceGroupAggregatedList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.
286 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
287 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
288 &quot;warning&quot;: { # [Output Only] Informational warning message.
289 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
290 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
291 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;key&quot;: &quot;A String&quot;, # [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).
294 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 },
296 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700297 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700299 }</pre>
300</div>
301
302<div class="method">
303 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
304 <pre>Retrieves the next page of results.
305
306Args:
307 previous_request: The request for the previous page. (required)
308 previous_response: The response from the request for the previous page. (required)
309
310Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700312 page. Returns None if there are no more items in the collection.
313 </pre>
314</div>
315
316<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 <code class="details" id="delete">delete(project, zone, instanceGroup, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700318 <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.
319
320Args:
321 project: string, Project ID for this request. (required)
322 zone: string, The name of the zone where the instance group is located. (required)
323 instanceGroup: string, The name of the instance group to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 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.
325
326For 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.
327
328The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700329
330Returns:
331 An object of the form:
332
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 { # Represents an Operation resource.
334 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 # Google Compute Engine has three Operation resources:
336 #
337 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
338 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700339 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
340 #
341 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 # - For global operations, use the `globalOperations` resource.
343 # - For regional operations, use the `regionOperations` resource.
344 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
348 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
349 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
350 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
351 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
352 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700353 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700354 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
355 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
356 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700357 },
358 ],
359 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700360 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
361 &quot;httpErrorStatusCode&quot;: 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.
362 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
363 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
364 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
365 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
366 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
367 &quot;progress&quot;: 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.
368 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
369 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
370 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
371 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
372 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
373 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
374 &quot;targetLink&quot;: &quot;A String&quot;, # [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 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
376 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
377 {
378 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
379 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
380 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
381 {
382 &quot;key&quot;: &quot;A String&quot;, # [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).
383 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
384 },
385 ],
386 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
387 },
388 ],
389 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700390 }</pre>
391</div>
392
393<div class="method">
394 <code class="details" id="get">get(project, zone, instanceGroup)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 <pre>Returns the specified instance group. Gets a list of available instance groups by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700396
397Args:
398 project: string, Project ID for this request. (required)
399 zone: string, The name of the zone where the instance group is located. (required)
400 instanceGroup: string, The name of the instance group. (required)
401
402Returns:
403 An object of the form:
404
Dan O'Mearadd494642020-05-01 07:42:23 -0700405 { # Represents an Instance Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 #
407 # Instance Groups can be used to configure a target for load balancing.
408 #
409 # Instance groups can either be managed or unmanaged.
410 #
411 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
412 #
413 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
414 #
415 # For more information, read Instance groups.
416 #
417 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
418 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
419 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
420 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
421 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
422 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
423 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
424 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 # 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: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 # Named ports apply to all instances in this instance group.
429 { # The named port. For example: .
430 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
431 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
432 },
433 ],
434 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
435 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
436 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
437 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
438 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
439 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
440 }</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700441</div>
442
443<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700444 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700445 <pre>Creates an instance group in the specified project using the parameters that are included in the request.
446
447Args:
448 project: string, Project ID for this request. (required)
449 zone: string, The name of the zone where you want to create the instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700450 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700451 The object takes the form of:
452
Dan O'Mearadd494642020-05-01 07:42:23 -0700453{ # Represents an Instance Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 #
455 # Instance Groups can be used to configure a target for load balancing.
456 #
457 # Instance groups can either be managed or unmanaged.
458 #
459 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
460 #
461 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
462 #
463 # For more information, read Instance groups.
464 #
465 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
466 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
467 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
468 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
469 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
470 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
471 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
472 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700473 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700474 # 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: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 # Named ports apply to all instances in this instance group.
477 { # The named port. For example: .
478 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
479 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
480 },
481 ],
482 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
483 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
484 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
485 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
486 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
487 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
488}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700489
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 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.
491
492For 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.
493
494The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700495
496Returns:
497 An object of the form:
498
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700499 { # Represents an Operation resource.
500 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 # Google Compute Engine has three Operation resources:
502 #
503 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
504 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
506 #
507 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700508 # - For global operations, use the `globalOperations` resource.
509 # - For regional operations, use the `regionOperations` resource.
510 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700512 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700513 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
514 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
515 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
516 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
517 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
518 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700519 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
521 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
522 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523 },
524 ],
525 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700526 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
527 &quot;httpErrorStatusCode&quot;: 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.
528 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
529 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
530 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
531 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
532 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
533 &quot;progress&quot;: 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.
534 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
535 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
536 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
537 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
538 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
539 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
540 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
541 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
542 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
543 {
544 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
545 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
546 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
547 {
548 &quot;key&quot;: &quot;A String&quot;, # [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).
549 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
550 },
551 ],
552 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
553 },
554 ],
555 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700556 }</pre>
557</div>
558
559<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700561 <pre>Retrieves the list of instance groups that are located in the specified project and zone.
562
563Args:
564 project: string, Project ID for this request. (required)
565 zone: string, The name of the zone where the instance group is located. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700566 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 `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700567
Dan O'Mearadd494642020-05-01 07:42:23 -0700568For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700569
Dan O'Mearadd494642020-05-01 07:42:23 -0700570You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700571
Bu Sun Kim65020912020-05-20 12:08:20 -0700572To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
573 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`)
574 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
575
576You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
577
578Currently, only sorting by `name` or `creationTimestamp desc` is supported.
579 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700580
581Returns:
582 An object of the form:
583
584 { # A list of InstanceGroup resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
586 &quot;items&quot;: [ # A list of InstanceGroup resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 { # Represents an Instance Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700588 #
589 # Instance Groups can be used to configure a target for load balancing.
590 #
591 # Instance groups can either be managed or unmanaged.
592 #
593 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
594 #
595 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
596 #
597 # For more information, read Instance groups.
598 #
599 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
600 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
601 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
602 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
603 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
604 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
605 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
606 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700608 # 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: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 # Named ports apply to all instances in this instance group.
611 { # The named port. For example: .
612 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
613 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
614 },
615 ],
616 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
617 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
618 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
619 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
620 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
621 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
622 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700623 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 &quot;kind&quot;: &quot;compute#instanceGroupList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.
625 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
626 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
627 &quot;warning&quot;: { # [Output Only] Informational warning message.
628 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
629 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
630 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 &quot;key&quot;: &quot;A String&quot;, # [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).
633 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 },
635 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700637 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700638 }</pre>
639</div>
640
641<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700643 <pre>Lists the instances in the specified instance group. The orderBy query parameter is not supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700644
645Args:
646 project: string, Project ID for this request. (required)
647 zone: string, The name of the zone where the instance group is located. (required)
648 instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700649 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700650 The object takes the form of:
651
652{
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;instanceState&quot;: &quot;A String&quot;, # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700654 }
655
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 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 `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700657
Dan O'Mearadd494642020-05-01 07:42:23 -0700658For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700659
Dan O'Mearadd494642020-05-01 07:42:23 -0700660You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700661
Bu Sun Kim65020912020-05-20 12:08:20 -0700662To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
663 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`)
664 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
665
666You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
667
668Currently, only sorting by `name` or `creationTimestamp desc` is supported.
669 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700670
671Returns:
672 An object of the form:
673
674 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
676 &quot;items&quot;: [ # A list of InstanceWithNamedPorts resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700677 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 &quot;instance&quot;: &quot;A String&quot;, # [Output Only] The URL of the instance.
679 &quot;namedPorts&quot;: [ # [Output Only] The named ports that belong to this instance group.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700680 { # The named port. For example: .
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
682 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700683 },
684 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700686 },
687 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;kind&quot;: &quot;compute#instanceGroupsListInstances&quot;, # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.
689 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
690 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
691 &quot;warning&quot;: { # [Output Only] Informational warning message.
692 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
693 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
694 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 &quot;key&quot;: &quot;A String&quot;, # [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).
697 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 },
699 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700702 }</pre>
703</div>
704
705<div class="method">
706 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code>
707 <pre>Retrieves the next page of results.
708
709Args:
710 previous_request: The request for the previous page. (required)
711 previous_response: The response from the request for the previous page. (required)
712
713Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700715 page. Returns None if there are no more items in the collection.
716 </pre>
717</div>
718
719<div class="method">
720 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
721 <pre>Retrieves the next page of results.
722
723Args:
724 previous_request: The request for the previous page. (required)
725 previous_response: The response from the request for the previous page. (required)
726
727Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700729 page. Returns None if there are no more items in the collection.
730 </pre>
731</div>
732
733<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700734 <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700735 <pre>Removes one or more instances from the specified instance group, but does not delete those instances.
736
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400737If 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.
738
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700739Args:
740 project: string, Project ID for this request. (required)
741 zone: string, The name of the zone where the instance group is located. (required)
742 instanceGroup: string, The name of the instance group where the specified instances will be removed. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700743 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700744 The object takes the form of:
745
746{
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 &quot;instances&quot;: [ # The list of instances to remove from the instance group.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700748 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 &quot;instance&quot;: &quot;A String&quot;, # The URL for a specific instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700750 },
751 ],
752 }
753
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700754 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.
755
756For 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.
757
758The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700759
760Returns:
761 An object of the form:
762
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 { # Represents an Operation resource.
764 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700765 # Google Compute Engine has three Operation resources:
766 #
767 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
768 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
770 #
771 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700772 # - For global operations, use the `globalOperations` resource.
773 # - For regional operations, use the `regionOperations` resource.
774 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700777 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
778 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
779 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
780 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
781 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
782 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700783 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
785 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
786 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700787 },
788 ],
789 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700790 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
791 &quot;httpErrorStatusCode&quot;: 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.
792 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
793 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
794 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
795 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
796 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
797 &quot;progress&quot;: 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.
798 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
799 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
800 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
801 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
802 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
803 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
804 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
805 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
806 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
807 {
808 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
809 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
810 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
811 {
812 &quot;key&quot;: &quot;A String&quot;, # [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).
813 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
814 },
815 ],
816 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
817 },
818 ],
819 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700820 }</pre>
821</div>
822
823<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700824 <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700825 <pre>Sets the named ports for the specified instance group.
826
827Args:
828 project: string, Project ID for this request. (required)
829 zone: string, The name of the zone where the instance group is located. (required)
830 instanceGroup: string, The name of the instance group where the named ports are updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700831 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700832 The object takes the form of:
833
834{
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
836 &quot;namedPorts&quot;: [ # The list of named ports to set for this instance group.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700837 { # The named port. For example: .
Bu Sun Kim65020912020-05-20 12:08:20 -0700838 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
839 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700840 },
841 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700842 }
843
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700844 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.
845
846For 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.
847
848The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700849
850Returns:
851 An object of the form:
852
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700853 { # Represents an Operation resource.
854 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700855 # Google Compute Engine has three Operation resources:
856 #
857 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
858 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700859 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
860 #
861 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700862 # - For global operations, use the `globalOperations` resource.
863 # - For regional operations, use the `regionOperations` resource.
864 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700865 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700866 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700867 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
868 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
869 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
870 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
871 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
872 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700873 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
875 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
876 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700877 },
878 ],
879 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
881 &quot;httpErrorStatusCode&quot;: 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.
882 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
883 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
884 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
885 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
886 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
887 &quot;progress&quot;: 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.
888 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
889 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
890 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
891 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
892 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
893 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
894 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
895 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
896 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
897 {
898 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
899 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
900 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
901 {
902 &quot;key&quot;: &quot;A String&quot;, # [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).
903 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
904 },
905 ],
906 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
907 },
908 ],
909 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700910 }</pre>
911</div>
912
913<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700914 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700915 <pre>Returns permissions that a caller has on the specified resource.
916
917Args:
918 project: string, Project ID for this request. (required)
919 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700921 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700922 The object takes the form of:
923
924{
Bu Sun Kim65020912020-05-20 12:08:20 -0700925 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
926 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700927 ],
928 }
929
930
931Returns:
932 An object of the form:
933
934 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
936 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700937 ],
938 }</pre>
939</div>
940
941</body></html>