blob: 83d43325db449a400520667e726ebd30820e1432 [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=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">
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">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#listInstances">listInstances(project, zone, instanceGroup, body=None, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<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">
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{
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
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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700159 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400161 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "zone": "A String", # [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 -0700164 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
166 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700170 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700171 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
172 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
173 {
174 "message": "A String", # [Output Only] A human-readable description of the warning code.
175 "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.
176 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
177 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
178 {
179 "value": "A String", # [Output Only] A warning data value corresponding to the key.
180 "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).
181 },
182 ],
183 },
184 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700185 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700186 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700187 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
188 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700190 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
191 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
192 {
193 "message": "A String", # [Output Only] An optional, human-readable error message.
194 "code": "A String", # [Output Only] The error type identifier for this error.
195 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
196 },
197 ],
198 },
199 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
200 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800201 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700202 }</pre>
203</div>
204
205<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700206 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=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)
211 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
212
Dan O'Mearadd494642020-05-01 07:42:23 -0700213You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700214
Dan O'Mearadd494642020-05-01 07:42:23 -0700215Currently, only sorting by `name` or `creationTimestamp desc` is supported.
216 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`)
217 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.
218 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 -0700219
Dan O'Mearadd494642020-05-01 07:42:23 -0700220For 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 -0700221
Dan O'Mearadd494642020-05-01 07:42:23 -0700222You 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 -0700223
Dan O'Mearadd494642020-05-01 07:42:23 -0700224To 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) ```
225 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700226
227Returns:
228 An object of the form:
229
230 {
231 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 "kind": "compute#instanceGroupAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.
233 "items": { # A list of InstanceGroupsScopedList resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234 "a_key": { # The name of the scope that contains this set of instance groups.
235 "warning": { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty.
236 "message": "A String", # [Output Only] A human-readable description of the warning code.
237 "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.
238 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
239 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
240 {
241 "value": "A String", # [Output Only] A warning data value corresponding to the key.
242 "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).
243 },
244 ],
245 },
246 "instanceGroups": [ # [Output Only] The list of instance groups that are contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700247 { # Represents an Instance Group resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 # Instance Groups can be used to configure a target for load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 # Instance groups can either be managed or unmanaged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
254 #
255 # 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.
256 #
257 # For more information, read Instance groups.
258 #
259 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700260 "size": 42, # [Output Only] The total number of instances in the instance group.
261 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
262 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
263 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 "network": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700266 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 "subnetwork": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700268 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
269 #
270 # 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}]
271 #
272 # Named ports apply to all instances in this instance group.
273 { # The named port. For example: .
274 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
275 "port": 42, # The port number, which can be a value between 1 and 65535.
276 },
277 ],
278 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
279 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
280 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
281 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
282 },
283 ],
284 },
285 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 "warning": { # [Output Only] Informational warning message.
287 "message": "A String", # [Output Only] A human-readable description of the warning code.
288 "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.
289 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
290 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
291 {
292 "value": "A String", # [Output Only] A warning data value corresponding to the key.
293 "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).
294 },
295 ],
296 },
297 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
298 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
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:
311 A request object that you can call 'execute()' on to request the next
312 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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700347 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400349 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700350 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700351 "zone": "A String", # [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 -0700352 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700353 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
354 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700355 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700357 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700358 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700359 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
360 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
361 {
362 "message": "A String", # [Output Only] A human-readable description of the warning code.
363 "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.
364 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
365 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
366 {
367 "value": "A String", # [Output Only] A warning data value corresponding to the key.
368 "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).
369 },
370 ],
371 },
372 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700373 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700374 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700375 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
376 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700378 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
379 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
380 {
381 "message": "A String", # [Output Only] An optional, human-readable error message.
382 "code": "A String", # [Output Only] The error type identifier for this error.
383 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
384 },
385 ],
386 },
387 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
388 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800389 "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.
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 Kim715bd7f2019-06-14 16:50:42 -0700406 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700407 # Instance Groups can be used to configure a target for load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700409 # Instance groups can either be managed or unmanaged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 # 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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700418 "size": 42, # [Output Only] The total number of instances in the instance group.
419 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
420 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
421 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
Dan O'Mearadd494642020-05-01 07:42:23 -0700423 "network": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700424 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 "subnetwork": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700426 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
427 #
428 # 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}]
429 #
430 # Named ports apply to all instances in this instance group.
431 { # The named port. For example: .
432 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
433 "port": 42, # The port number, which can be a value between 1 and 65535.
434 },
435 ],
436 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
437 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
438 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
439 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
440 }</pre>
441</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 Kim715bd7f2019-06-14 16:50:42 -0700454 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700455 # Instance Groups can be used to configure a target for load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 # Instance groups can either be managed or unmanaged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 # 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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700466 "size": 42, # [Output Only] The total number of instances in the instance group.
467 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
468 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
469 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
Dan O'Mearadd494642020-05-01 07:42:23 -0700471 "network": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700472 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700473 "subnetwork": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
475 #
476 # 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}]
477 #
478 # Named ports apply to all instances in this instance group.
479 { # The named port. For example: .
480 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
481 "port": 42, # The port number, which can be a value between 1 and 65535.
482 },
483 ],
484 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
485 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
486 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
487 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
488 }
489
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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700513 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700514 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400515 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700516 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 "zone": "A String", # [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 -0700518 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
520 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700521 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700522 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700524 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700525 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
526 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
527 {
528 "message": "A String", # [Output Only] A human-readable description of the warning code.
529 "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.
530 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
531 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
532 {
533 "value": "A String", # [Output Only] A warning data value corresponding to the key.
534 "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).
535 },
536 ],
537 },
538 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700539 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700540 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700541 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
542 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700544 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
545 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
546 {
547 "message": "A String", # [Output Only] An optional, human-readable error message.
548 "code": "A String", # [Output Only] The error type identifier for this error.
549 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
550 },
551 ],
552 },
553 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
554 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800555 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700556 }</pre>
557</div>
558
559<div class="method">
560 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
561 <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)
566 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
567
Dan O'Mearadd494642020-05-01 07:42:23 -0700568You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700569
Dan O'Mearadd494642020-05-01 07:42:23 -0700570Currently, only sorting by `name` or `creationTimestamp desc` is supported.
571 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`)
572 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.
573 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 -0700574
Dan O'Mearadd494642020-05-01 07:42:23 -0700575For 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 -0700576
Dan O'Mearadd494642020-05-01 07:42:23 -0700577You 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 -0700578
Dan O'Mearadd494642020-05-01 07:42:23 -0700579To 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) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700580
581Returns:
582 An object of the form:
583
584 { # A list of InstanceGroup resources.
585 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 "kind": "compute#instanceGroupList", # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.
587 "items": [ # A list of InstanceGroup resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700588 { # Represents an Instance Group resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 # Instance Groups can be used to configure a target for load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 # Instance groups can either be managed or unmanaged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
595 #
596 # 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.
597 #
598 # For more information, read Instance groups.
599 #
600 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700601 "size": 42, # [Output Only] The total number of instances in the instance group.
602 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
603 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
604 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700605 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources).
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 "network": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700607 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 "subnetwork": "A String", # [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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700609 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80}
610 #
611 # 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}]
612 #
613 # Named ports apply to all instances in this instance group.
614 { # The named port. For example: .
615 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
616 "port": 42, # The port number, which can be a value between 1 and 65535.
617 },
618 ],
619 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
620 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server.
621 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL.
622 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
623 },
624 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700625 "warning": { # [Output Only] Informational warning message.
626 "message": "A String", # [Output Only] A human-readable description of the warning code.
627 "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.
628 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
629 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
630 {
631 "value": "A String", # [Output Only] A warning data value corresponding to the key.
632 "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).
633 },
634 ],
635 },
636 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
637 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700638 }</pre>
639</div>
640
641<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700642 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body=None, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700643 <pre>Lists the instances in the specified instance group.
644
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{
653 "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.
654 }
655
656 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
657
Dan O'Mearadd494642020-05-01 07:42:23 -0700658You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700659
Dan O'Mearadd494642020-05-01 07:42:23 -0700660Currently, only sorting by `name` or `creationTimestamp desc` is supported.
661 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`)
662 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.
663 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 -0700664
Dan O'Mearadd494642020-05-01 07:42:23 -0700665For 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 -0700666
Dan O'Mearadd494642020-05-01 07:42:23 -0700667You 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 -0700668
Dan O'Mearadd494642020-05-01 07:42:23 -0700669To 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) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700670
671Returns:
672 An object of the form:
673
674 {
675 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 "kind": "compute#instanceGroupsListInstances", # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.
677 "items": [ # A list of InstanceWithNamedPorts resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700678 {
679 "status": "A String", # [Output Only] The status of the instance.
680 "instance": "A String", # [Output Only] The URL of the instance.
681 "namedPorts": [ # [Output Only] The named ports that belong to this instance group.
682 { # The named port. For example: .
683 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
684 "port": 42, # The port number, which can be a value between 1 and 65535.
685 },
686 ],
687 },
688 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 "warning": { # [Output Only] Informational warning message.
690 "message": "A String", # [Output Only] A human-readable description of the warning code.
691 "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.
692 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
693 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
694 {
695 "value": "A String", # [Output Only] A warning data value corresponding to the key.
696 "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).
697 },
698 ],
699 },
700 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
701 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
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:
714 A request object that you can call 'execute()' on to request the next
715 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:
728 A request object that you can call 'execute()' on to request the next
729 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{
747 "instances": [ # The list of instances to remove from the instance group.
748 {
749 "instance": "A String", # The URL for a specific instance.
750 },
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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700777 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400779 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700780 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700781 "zone": "A String", # [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 -0700782 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700783 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
784 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700785 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700786 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700787 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700788 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700789 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
790 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
791 {
792 "message": "A String", # [Output Only] A human-readable description of the warning code.
793 "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.
794 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
795 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
796 {
797 "value": "A String", # [Output Only] A warning data value corresponding to the key.
798 "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).
799 },
800 ],
801 },
802 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700804 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700805 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
806 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700808 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
809 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
810 {
811 "message": "A String", # [Output Only] An optional, human-readable error message.
812 "code": "A String", # [Output Only] The error type identifier for this error.
813 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
814 },
815 ],
816 },
817 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
818 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800819 "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.
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{
835 "namedPorts": [ # The list of named ports to set for this instance group.
836 { # The named port. For example: .
837 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
838 "port": 42, # The port number, which can be a value between 1 and 65535.
839 },
840 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 "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.
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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700867 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400869 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871 "zone": "A String", # [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 -0700872 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700873 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
874 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700875 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700876 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700877 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700878 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700879 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
880 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
881 {
882 "message": "A String", # [Output Only] A human-readable description of the warning code.
883 "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.
884 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
885 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
886 {
887 "value": "A String", # [Output Only] A warning data value corresponding to the key.
888 "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).
889 },
890 ],
891 },
892 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700894 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700895 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
896 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700897 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700898 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
899 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
900 {
901 "message": "A String", # [Output Only] An optional, human-readable error message.
902 "code": "A String", # [Output Only] The error type identifier for this error.
903 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
904 },
905 ],
906 },
907 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
908 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800909 "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.
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{
925 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
926 "A String",
927 ],
928 }
929
930
931Returns:
932 An object of the form:
933
934 {
935 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
936 "A String",
937 ],
938 }</pre>
939</div>
940
941</body></html>