blob: fbda693df34ab0377f1046731fb3bdf75e5b4dc1 [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.globalOperations.html">globalOperations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Retrieves an aggregated list of all operations.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#delete">delete(project, operation)</a></code></p>
88<p class="firstline">Deletes the specified Operations resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, operation)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070091<p class="firstline">Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070092<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Retrieves a list of Operation resources contained within the specified project.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -070098<p class="toc_element">
99 <code><a href="#wait">wait(project, operation)</a></code></p>
100<p class="firstline">Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<h3>Method Details</h3>
102<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104 <pre>Retrieves an aggregated list of all operations.
105
106Args:
107 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 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 -0700109
Dan O'Mearadd494642020-05-01 07:42:23 -0700110For 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 -0700111
Dan O'Mearadd494642020-05-01 07:42:23 -0700112You 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 -0700113
Bu Sun Kim65020912020-05-20 12:08:20 -0700114To 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 -0700115 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 -0700116 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`)
117 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
118
119You 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.
120
121Currently, only sorting by `name` or `creationTimestamp desc` is supported.
122 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124
125Returns:
126 An object of the form:
127
128 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
130 &quot;items&quot;: { # [Output Only] A map of scoped operation lists.
131 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of operations.
132 &quot;operations&quot;: [ # [Output Only] A list of operations contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 { # Represents an Operation resource.
134 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 # Google Compute Engine has three Operation resources:
136 #
137 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
138 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
140 #
141 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700142 # - For global operations, use the `globalOperations` resource.
143 # - For regional operations, use the `regionOperations` resource.
144 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 # 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 -0700147 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
148 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
149 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
150 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
151 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
152 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700153 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
155 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
156 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157 },
158 ],
159 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700160 &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`.
161 &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.
162 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
163 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
164 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
165 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
166 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
167 &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.
168 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
169 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
170 &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.
171 &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`.
172 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
173 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
174 &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.
175 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
176 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
177 {
178 &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.
179 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
180 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
181 {
182 &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).
183 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
184 },
185 ],
186 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
187 },
188 ],
189 &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 -0700190 },
191 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of operations when the list is empty.
193 &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.
194 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
195 # &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 -0700196 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &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).
198 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700199 },
200 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700202 },
203 },
204 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700205 &quot;kind&quot;: &quot;compute#operationAggregatedList&quot;, # [Output Only] Type of resource. Always `compute#operationAggregatedList` for aggregated lists of operations.
206 &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.
207 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
209 &quot;A String&quot;,
210 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 &quot;warning&quot;: { # [Output Only] Informational warning message.
212 &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.
213 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
214 # &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 -0700215 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 &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).
217 &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 -0700218 },
219 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 &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 -0700221 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700222 }</pre>
223</div>
224
225<div class="method">
226 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
227 <pre>Retrieves the next page of results.
228
229Args:
230 previous_request: The request for the previous page. (required)
231 previous_response: The response from the request for the previous page. (required)
232
233Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700235 page. Returns None if there are no more items in the collection.
236 </pre>
237</div>
238
239<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700240 <code class="details" id="close">close()</code>
241 <pre>Close httplib2 connections.</pre>
242</div>
243
244<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700245 <code class="details" id="delete">delete(project, operation)</code>
246 <pre>Deletes the specified Operations resource.
247
248Args:
249 project: string, Project ID for this request. (required)
250 operation: string, Name of the Operations resource to delete. (required)
251</pre>
252</div>
253
254<div class="method">
255 <code class="details" id="get">get(project, operation)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 <pre>Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700257
258Args:
259 project: string, Project ID for this request. (required)
260 operation: string, Name of the Operations resource to return. (required)
261
262Returns:
263 An object of the form:
264
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 { # Represents an Operation resource.
266 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 # Google Compute Engine has three Operation resources:
268 #
269 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
270 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
272 #
273 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 # - For global operations, use the `globalOperations` resource.
275 # - For regional operations, use the `regionOperations` resource.
276 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700278 # 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 -0700279 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
280 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
281 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
282 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
283 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
284 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700285 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
287 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
288 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700289 },
290 ],
291 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 &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`.
293 &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.
294 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
295 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
296 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
297 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
298 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
299 &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.
300 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
301 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
302 &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.
303 &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`.
304 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
305 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
306 &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.
307 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
308 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
309 {
310 &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.
311 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
312 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
313 {
314 &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).
315 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
316 },
317 ],
318 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
319 },
320 ],
321 &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 -0700322 }</pre>
323</div>
324
325<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700326 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700327 <pre>Retrieves a list of Operation resources contained within the specified project.
328
329Args:
330 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700331 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 -0700332
Dan O'Mearadd494642020-05-01 07:42:23 -0700333For 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 -0700334
Dan O'Mearadd494642020-05-01 07:42:23 -0700335You 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 -0700336
Bu Sun Kim65020912020-05-20 12:08:20 -0700337To 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) ```
338 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`)
339 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
340
341You 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.
342
343Currently, only sorting by `name` or `creationTimestamp desc` is supported.
344 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700345 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700346
347Returns:
348 An object of the form:
349
350 { # Contains a list of Operation resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
352 &quot;items&quot;: [ # [Output Only] A list of Operation resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700353 { # Represents an Operation resource.
354 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 # Google Compute Engine has three Operation resources:
356 #
357 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
358 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
360 #
361 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 # - For global operations, use the `globalOperations` resource.
363 # - For regional operations, use the `regionOperations` resource.
364 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700365 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 # 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 -0700367 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
368 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
369 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
370 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
371 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
372 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700373 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
375 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
376 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700377 },
378 ],
379 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 &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`.
381 &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.
382 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
383 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
384 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
385 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
386 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
387 &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.
388 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
389 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
390 &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.
391 &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`.
392 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
393 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
394 &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.
395 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
396 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
397 {
398 &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.
399 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
400 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
401 {
402 &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).
403 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
404 },
405 ],
406 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
407 },
408 ],
409 &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 -0700410 },
411 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;kind&quot;: &quot;compute#operationList&quot;, # [Output Only] Type of resource. Always `compute#operations` for Operations resource.
413 &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.
414 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
415 &quot;warning&quot;: { # [Output Only] Informational warning message.
416 &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.
417 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
418 # &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 -0700419 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 &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).
421 &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 -0700422 },
423 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700424 &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 -0700425 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700426 }</pre>
427</div>
428
429<div class="method">
430 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
431 <pre>Retrieves the next page of results.
432
433Args:
434 previous_request: The request for the previous page. (required)
435 previous_response: The response from the request for the previous page. (required)
436
437Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700438 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700439 page. Returns None if there are no more items in the collection.
440 </pre>
441</div>
442
Dan O'Mearadd494642020-05-01 07:42:23 -0700443<div class="method">
444 <code class="details" id="wait">wait(project, operation)</code>
445 <pre>Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress.
446
447This method is called on a best-effort basis. Specifically:
448- In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds.
449- If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
450
451Args:
452 project: string, Project ID for this request. (required)
453 operation: string, Name of the Operations resource to return. (required)
454
455Returns:
456 An object of the form:
457
458 { # Represents an Operation resource.
459 #
460 # Google Compute Engine has three Operation resources:
461 #
462 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
463 #
464 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
465 #
466 # Operations can be global, regional or zonal.
467 # - For global operations, use the `globalOperations` resource.
468 # - For regional operations, use the `regionOperations` resource.
469 # - For zonal operations, use the `zonalOperations` resource.
470 #
471 # 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 -0700472 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
473 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
474 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
475 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
476 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
477 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700478 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
480 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
481 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 },
483 ],
484 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 &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`.
486 &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.
487 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
488 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
489 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
490 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
491 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
492 &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.
493 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
494 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
495 &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.
496 &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`.
497 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
498 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
499 &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.
500 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
501 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
502 {
503 &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.
504 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
505 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
506 {
507 &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).
508 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
509 },
510 ],
511 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
512 },
513 ],
514 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700515 }</pre>
516</div>
517
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700518</body></html>