blob: e12f9a7697ecdb344e506a5f4b456057c56128c9 [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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.globalOperations.html">globalOperations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None, includeAllScopes=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">
84 <code><a href="#delete">delete(project, operation)</a></code></p>
85<p class="firstline">Deletes the specified Operations resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, operation)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070088<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 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Retrieves a list of Operation resources contained within the specified project.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070095<p class="toc_element">
96 <code><a href="#wait">wait(project, operation)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070097<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 -070098<h3>Method Details</h3>
99<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None, includeAllScopes=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101 <pre>Retrieves an aggregated list of all operations.
102
103Args:
104 project: string, Project ID for this request. (required)
105 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
106
Dan O'Mearadd494642020-05-01 07:42:23 -0700107You 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 -0700108
Dan O'Mearadd494642020-05-01 07:42:23 -0700109Currently, only sorting by `name` or `creationTimestamp desc` is supported.
110 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`)
111 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.
112 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.
113 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 -0700114
Dan O'Mearadd494642020-05-01 07:42:23 -0700115For 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 -0700116
Dan O'Mearadd494642020-05-01 07:42:23 -0700117You 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 -0700118
Dan O'Mearadd494642020-05-01 07:42:23 -0700119To 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) ```
120 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 -0700121
122Returns:
123 An object of the form:
124
125 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 "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.
127 "kind": "compute#operationAggregatedList", # [Output Only] Type of resource. Always `compute#operationAggregatedList` for aggregated lists of operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700128 "items": { # [Output Only] A map of scoped operation lists.
129 "a_key": { # [Output Only] Name of the scope containing this set of operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 "operations": [ # [Output Only] A list of operations contained in this scope.
131 { # Represents an Operation resource.
132 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700133 # Google Compute Engine has three Operation resources:
134 #
135 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
136 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
138 #
139 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700140 # - For global operations, use the `globalOperations` resource.
141 # - For regional operations, use the `regionOperations` resource.
142 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 # 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 -0700145 "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 -0700146 "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 -0400147 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 "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 -0700149 "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 -0700150 "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 -0700151 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
152 "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 -0700153 "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 -0700154 "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 -0700155 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 "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 -0700157 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
158 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
159 {
160 "message": "A String", # [Output Only] A human-readable description of the warning code.
161 "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.
162 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
163 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
164 {
165 "value": "A String", # [Output Only] A warning data value corresponding to the key.
166 "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).
167 },
168 ],
169 },
170 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700171 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700172 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700173 "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 -0700174 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
175 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 "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 -0700177 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
178 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
179 {
180 "message": "A String", # [Output Only] An optional, human-readable error message.
181 "code": "A String", # [Output Only] The error type identifier for this error.
182 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
183 },
184 ],
185 },
186 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
187 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800188 "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 -0700189 },
190 ],
191 "warning": { # [Output Only] Informational warning which replaces the list of operations when the list is empty.
192 "message": "A String", # [Output Only] A human-readable description of the warning code.
193 "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.
194 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
195 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
196 {
197 "value": "A String", # [Output Only] A warning data value corresponding to the key.
198 "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).
199 },
200 ],
201 },
202 },
203 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 "warning": { # [Output Only] Informational warning message.
205 "message": "A String", # [Output Only] A human-readable description of the warning code.
206 "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.
207 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
208 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
209 {
210 "value": "A String", # [Output Only] A warning data value corresponding to the key.
211 "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).
212 },
213 ],
214 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700215 "unreachables": [ # [Output Only] Unreachable resources.
216 "A String",
217 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700218 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
219 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
220 }</pre>
221</div>
222
223<div class="method">
224 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
225 <pre>Retrieves the next page of results.
226
227Args:
228 previous_request: The request for the previous page. (required)
229 previous_response: The response from the request for the previous page. (required)
230
231Returns:
232 A request object that you can call 'execute()' on to request the next
233 page. Returns None if there are no more items in the collection.
234 </pre>
235</div>
236
237<div class="method">
238 <code class="details" id="delete">delete(project, operation)</code>
239 <pre>Deletes the specified Operations resource.
240
241Args:
242 project: string, Project ID for this request. (required)
243 operation: string, Name of the Operations resource to delete. (required)
244</pre>
245</div>
246
247<div class="method">
248 <code class="details" id="get">get(project, operation)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 <pre>Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700250
251Args:
252 project: string, Project ID for this request. (required)
253 operation: string, Name of the Operations resource to return. (required)
254
255Returns:
256 An object of the form:
257
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 { # Represents an Operation resource.
259 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 # Google Compute Engine has three Operation resources:
261 #
262 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
263 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
265 #
266 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 # - For global operations, use the `globalOperations` resource.
268 # - For regional operations, use the `regionOperations` resource.
269 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 # 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 -0700272 "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 -0700273 "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 -0400274 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 "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 -0700276 "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 -0700277 "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 -0700278 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
279 "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 -0700280 "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 -0700281 "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 -0700282 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 "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 -0700284 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
285 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
286 {
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 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700299 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700300 "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 -0700301 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
302 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 "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 -0700304 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
305 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
306 {
307 "message": "A String", # [Output Only] An optional, human-readable error message.
308 "code": "A String", # [Output Only] The error type identifier for this error.
309 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
310 },
311 ],
312 },
313 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
314 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800315 "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 -0700316 }</pre>
317</div>
318
319<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700321 <pre>Retrieves a list of Operation resources contained within the specified project.
322
323Args:
324 project: string, Project ID for this request. (required)
325 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
326
Dan O'Mearadd494642020-05-01 07:42:23 -0700327You 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 -0700328
Dan O'Mearadd494642020-05-01 07:42:23 -0700329Currently, only sorting by `name` or `creationTimestamp desc` is supported.
330 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`)
331 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.
332 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.
333 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 -0700334
Dan O'Mearadd494642020-05-01 07:42:23 -0700335For 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 -0700336
Dan O'Mearadd494642020-05-01 07:42:23 -0700337You 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 -0700338
Dan O'Mearadd494642020-05-01 07:42:23 -0700339To 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 -0700340
341Returns:
342 An object of the form:
343
344 { # Contains a list of Operation resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700345 "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.
346 "kind": "compute#operationList", # [Output Only] Type of resource. Always `compute#operations` for Operations resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700347 "items": [ # [Output Only] A list of Operation resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348 { # Represents an Operation resource.
349 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700350 # Google Compute Engine has three Operation resources:
351 #
352 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
353 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
355 #
356 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 # - For global operations, use the `globalOperations` resource.
358 # - For regional operations, use the `regionOperations` resource.
359 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 # 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 -0700362 "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 -0700363 "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 -0400364 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 "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 -0700366 "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 -0700367 "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 -0700368 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
369 "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 -0700370 "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 -0700371 "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 -0700372 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700373 "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 -0700374 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
375 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
376 {
377 "message": "A String", # [Output Only] A human-readable description of the warning code.
378 "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.
379 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
380 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
381 {
382 "value": "A String", # [Output Only] A warning data value corresponding to the key.
383 "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).
384 },
385 ],
386 },
387 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700389 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700390 "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 -0700391 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
392 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 "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 -0700394 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
395 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
396 {
397 "message": "A String", # [Output Only] An optional, human-readable error message.
398 "code": "A String", # [Output Only] The error type identifier for this error.
399 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
400 },
401 ],
402 },
403 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
404 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800405 "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 -0700406 },
407 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 "warning": { # [Output Only] Informational warning message.
409 "message": "A String", # [Output Only] A human-readable description of the warning code.
410 "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.
411 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
412 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
413 {
414 "value": "A String", # [Output Only] A warning data value corresponding to the key.
415 "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).
416 },
417 ],
418 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700419 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
420 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
421 }</pre>
422</div>
423
424<div class="method">
425 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
426 <pre>Retrieves the next page of results.
427
428Args:
429 previous_request: The request for the previous page. (required)
430 previous_response: The response from the request for the previous page. (required)
431
432Returns:
433 A request object that you can call 'execute()' on to request the next
434 page. Returns None if there are no more items in the collection.
435 </pre>
436</div>
437
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438<div class="method">
439 <code class="details" id="wait">wait(project, operation)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700440 <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.
441
442This method is called on a best-effort basis. Specifically:
443- In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds.
444- 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`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700445
446Args:
447 project: string, Project ID for this request. (required)
448 operation: string, Name of the Operations resource to return. (required)
449
450Returns:
451 An object of the form:
452
453 { # Represents an Operation resource.
454 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700455 # Google Compute Engine has three Operation resources:
456 #
457 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
458 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
460 #
461 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 # - For global operations, use the `globalOperations` resource.
463 # - For regional operations, use the `regionOperations` resource.
464 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700466 # 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 Kim715bd7f2019-06-14 16:50:42 -0700467 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
468 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
469 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700470 "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 -0700471 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
472 "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 -0700473 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
474 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 "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 -0700476 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700478 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
480 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
481 {
482 "message": "A String", # [Output Only] A human-readable description of the warning code.
483 "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.
484 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
485 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
486 {
487 "value": "A String", # [Output Only] A warning data value corresponding to the key.
488 "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).
489 },
490 ],
491 },
492 ],
493 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 "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 -0700496 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
497 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
499 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
500 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
501 {
502 "message": "A String", # [Output Only] An optional, human-readable error message.
503 "code": "A String", # [Output Only] The error type identifier for this error.
504 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
505 },
506 ],
507 },
508 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
509 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
510 "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.
511 }</pre>
512</div>
513
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700514</body></html>