blob: 4b78061156974f828cf68cca8f52d50f260e381f [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.targetPools.html">targetPools</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addHealthCheck">addHealthCheck(project, region, targetPool, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Adds health check URLs to a target pool.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#addInstance">addInstance(project, region, targetPool, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Adds an instance to a target pool.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Retrieves an aggregated list of target pools.</p>
86<p class="toc_element">
87 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#delete">delete(project, region, targetPool, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Deletes the specified target pool.</p>
92<p class="toc_element">
93 <code><a href="#get">get(project, region, targetPool)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Returns the specified target pool. Gets a list of available target pools by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#getHealth">getHealth(project, region, targetPool, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Creates a target pool in the specified project and region using the data included in the request.</p>
101<p class="toc_element">
102 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
103<p class="firstline">Retrieves a list of target pools available to the specified project and region.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#removeHealthCheck">removeHealthCheck(project, region, targetPool, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<p class="firstline">Removes health check URL from a target pool.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#removeInstance">removeInstance(project, region, targetPool, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Removes instance URL from a target pool.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#setBackup">setBackup(project, region, targetPool, body=None, failoverRatio=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Changes a backup target pool's configurations.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
119<h3>Method Details</h3>
120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 <code class="details" id="addHealthCheck">addHealthCheck(project, region, targetPool, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122 <pre>Adds health check URLs to a target pool.
123
124Args:
125 project: string, Project ID for this request. (required)
126 region: string, Name of the region scoping this request. (required)
127 targetPool: string, Name of the target pool to add a health check to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700128 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129 The object takes the form of:
130
131{
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400132 "healthChecks": [ # The HttpHealthCheck to add to the target pool.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133 { # A full or valid partial URL to a health check. For example, the following are valid URLs:
134 # - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check
135 # - projects/project-id/global/httpHealthChecks/health-check
136 # - global/httpHealthChecks/health-check
137 "healthCheck": "A String",
138 },
139 ],
140 }
141
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
143
144For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
145
146The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700147
148Returns:
149 An object of the form:
150
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 { # Represents an Operation resource.
152 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 # Google Compute Engine has three Operation resources:
154 #
155 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
156 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
158 #
159 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700160 # - For global operations, use the `globalOperations` resource.
161 # - For regional operations, use the `regionOperations` resource.
162 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700164 # 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 -0700165 "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 -0700166 "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 -0400167 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 "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 -0700169 "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 -0700170 "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 -0700171 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
172 "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 -0700173 "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 -0700174 "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 -0700175 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 "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 -0700177 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
178 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
179 {
180 "message": "A String", # [Output Only] A human-readable description of the warning code.
181 "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.
182 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
183 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
184 {
185 "value": "A String", # [Output Only] A warning data value corresponding to the key.
186 "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).
187 },
188 ],
189 },
190 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700192 "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 -0700193 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
194 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 "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 -0700196 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
197 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
198 {
199 "message": "A String", # [Output Only] An optional, human-readable error message.
200 "code": "A String", # [Output Only] The error type identifier for this error.
201 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
202 },
203 ],
204 },
205 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
206 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800207 "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 -0700208 }</pre>
209</div>
210
211<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 <code class="details" id="addInstance">addInstance(project, region, targetPool, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700213 <pre>Adds an instance to a target pool.
214
215Args:
216 project: string, Project ID for this request. (required)
217 region: string, Name of the region scoping this request. (required)
218 targetPool: string, Name of the TargetPool resource to add instances to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700220 The object takes the form of:
221
222{
223 "instances": [ # A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are valid URLs:
224 # - https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name
225 # - projects/project-id/zones/zone/instances/instance-name
226 # - zones/zone/instances/instance-name
227 {
228 "instance": "A String", # The URL for a specific instance.
229 },
230 ],
231 }
232
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
234
235For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
236
237The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700238
239Returns:
240 An object of the form:
241
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 { # Represents an Operation resource.
243 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700244 # Google Compute Engine has three Operation resources:
245 #
246 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
247 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
249 #
250 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 # - For global operations, use the `globalOperations` resource.
252 # - For regional operations, use the `regionOperations` resource.
253 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # 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 -0700256 "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 -0700257 "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 -0400258 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 "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 -0700260 "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 -0700261 "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 -0700262 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
263 "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 -0700264 "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 -0700265 "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 -0700266 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 "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 -0700268 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
269 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
270 {
271 "message": "A String", # [Output Only] A human-readable description of the warning code.
272 "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.
273 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
274 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
275 {
276 "value": "A String", # [Output Only] A warning data value corresponding to the key.
277 "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).
278 },
279 ],
280 },
281 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700282 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700283 "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 -0700284 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
285 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 "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 -0700287 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
288 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
289 {
290 "message": "A String", # [Output Only] An optional, human-readable error message.
291 "code": "A String", # [Output Only] The error type identifier for this error.
292 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
293 },
294 ],
295 },
296 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
297 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800298 "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 -0700299 }</pre>
300</div>
301
302<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700303 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700304 <pre>Retrieves an aggregated list of target pools.
305
306Args:
307 project: string, Project ID for this request. (required)
308 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
309
Dan O'Mearadd494642020-05-01 07:42:23 -0700310You 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 -0700311
Dan O'Mearadd494642020-05-01 07:42:23 -0700312Currently, only sorting by `name` or `creationTimestamp desc` is supported.
313 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`)
314 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.
315 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 -0700316
Dan O'Mearadd494642020-05-01 07:42:23 -0700317For 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 -0700318
Dan O'Mearadd494642020-05-01 07:42:23 -0700319You 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 -0700320
Dan O'Mearadd494642020-05-01 07:42:23 -0700321To 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) ```
322 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 -0700323
324Returns:
325 An object of the form:
326
327 {
328 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700329 "kind": "compute#targetPoolAggregatedList", # [Output Only] Type of resource. Always compute#targetPoolAggregatedList for aggregated lists of target pools.
330 "items": { # A list of TargetPool resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700331 "a_key": { # Name of the scope containing this set of target pools.
332 "warning": { # Informational warning which replaces the list of addresses when the list is empty.
333 "message": "A String", # [Output Only] A human-readable description of the warning code.
334 "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.
335 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
336 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
337 {
338 "value": "A String", # [Output Only] A warning data value corresponding to the key.
339 "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).
340 },
341 ],
342 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 "targetPools": [ # A list of target pools contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 { # Represents a Target Pool resource.
345 #
346 # Target pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools. (== resource_for {$api_version}.targetPools ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700347 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].
348 #
349 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.
350 #
351 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
352 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
353 "region": "A String", # [Output Only] URL of the region where the target pool resides.
354 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 "sessionAffinity": "A String", # Session affinity option, must be one of the following values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700356 # NONE: Connections from the same client IP may go to any instance in the pool.
357 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy.
358 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
359 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
360 "A String",
361 ],
362 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1].
363 #
364 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.
365 #
366 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400367 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700368 "A String",
369 ],
370 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
371 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
372 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700374 },
375 ],
376 },
377 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700378 "warning": { # [Output Only] Informational warning message.
379 "message": "A String", # [Output Only] A human-readable description of the warning code.
380 "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.
381 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
382 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
383 {
384 "value": "A String", # [Output Only] A warning data value corresponding to the key.
385 "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).
386 },
387 ],
388 },
389 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700390 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
391 }</pre>
392</div>
393
394<div class="method">
395 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
396 <pre>Retrieves the next page of results.
397
398Args:
399 previous_request: The request for the previous page. (required)
400 previous_response: The response from the request for the previous page. (required)
401
402Returns:
403 A request object that you can call 'execute()' on to request the next
404 page. Returns None if there are no more items in the collection.
405 </pre>
406</div>
407
408<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700409 <code class="details" id="delete">delete(project, region, targetPool, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700410 <pre>Deletes the specified target pool.
411
412Args:
413 project: string, Project ID for this request. (required)
414 region: string, Name of the region scoping this request. (required)
415 targetPool: string, Name of the TargetPool resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
417
418For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
419
420The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700421
422Returns:
423 An object of the form:
424
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 { # Represents an Operation resource.
426 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700427 # Google Compute Engine has three Operation resources:
428 #
429 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
430 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700431 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
432 #
433 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 # - For global operations, use the `globalOperations` resource.
435 # - For regional operations, use the `regionOperations` resource.
436 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700437 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700438 # 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 -0700439 "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 -0700440 "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 -0400441 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700442 "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 -0700443 "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 -0700444 "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 -0700445 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
446 "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 -0700447 "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 -0700448 "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 -0700449 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700450 "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 -0700451 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
452 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
453 {
454 "message": "A String", # [Output Only] A human-readable description of the warning code.
455 "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.
456 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
457 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
458 {
459 "value": "A String", # [Output Only] A warning data value corresponding to the key.
460 "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).
461 },
462 ],
463 },
464 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700465 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700466 "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 -0700467 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
468 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 "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 -0700470 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
471 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
472 {
473 "message": "A String", # [Output Only] An optional, human-readable error message.
474 "code": "A String", # [Output Only] The error type identifier for this error.
475 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
476 },
477 ],
478 },
479 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
480 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800481 "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 -0700482 }</pre>
483</div>
484
485<div class="method">
486 <code class="details" id="get">get(project, region, targetPool)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 <pre>Returns the specified target pool. Gets a list of available target pools by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700488
489Args:
490 project: string, Project ID for this request. (required)
491 region: string, Name of the region scoping this request. (required)
492 targetPool: string, Name of the TargetPool resource to return. (required)
493
494Returns:
495 An object of the form:
496
Dan O'Mearadd494642020-05-01 07:42:23 -0700497 { # Represents a Target Pool resource.
498 #
499 # Target pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools. (== resource_for {$api_version}.targetPools ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700500 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].
501 #
502 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.
503 #
504 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
505 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
506 "region": "A String", # [Output Only] URL of the region where the target pool resides.
507 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700508 "sessionAffinity": "A String", # Session affinity option, must be one of the following values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700509 # NONE: Connections from the same client IP may go to any instance in the pool.
510 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy.
511 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
512 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
513 "A String",
514 ],
515 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1].
516 #
517 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.
518 #
519 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400520 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700521 "A String",
522 ],
523 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
524 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
525 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700527 }</pre>
528</div>
529
530<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 <code class="details" id="getHealth">getHealth(project, region, targetPool, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700532 <pre>Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.
533
534Args:
535 project: string, Project ID for this request. (required)
536 region: string, Name of the region scoping this request. (required)
537 targetPool: string, Name of the TargetPool resource to which the queried instance belongs. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700538 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700539 The object takes the form of:
540
541{
542 "instance": "A String", # The URL for a specific instance.
543}
544
545
546Returns:
547 An object of the form:
548
549 {
550 "kind": "compute#targetPoolInstanceHealth", # [Output Only] Type of resource. Always compute#targetPoolInstanceHealth when checking the health of an instance.
551 "healthStatus": [
552 {
553 "instance": "A String", # URL of the instance resource.
554 "healthState": "A String", # Health state of the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 "ipAddress": "A String", # A forwarding rule IP address assigned to this instance.
556 "annotations": { # Metadata defined as annotations for network endpoint.
557 "a_key": "A String",
558 },
559 "port": 42, # The named port of the instance group, not necessarily the port that is health-checked.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 },
561 ],
562 }</pre>
563</div>
564
565<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700566 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700567 <pre>Creates a target pool in the specified project and region using the data included in the request.
568
569Args:
570 project: string, Project ID for this request. (required)
571 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700572 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700573 The object takes the form of:
574
Dan O'Mearadd494642020-05-01 07:42:23 -0700575{ # Represents a Target Pool resource.
576 #
577 # Target pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools. (== resource_for {$api_version}.targetPools ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700578 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].
579 #
580 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.
581 #
582 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
583 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
584 "region": "A String", # [Output Only] URL of the region where the target pool resides.
585 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 "sessionAffinity": "A String", # Session affinity option, must be one of the following values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700587 # NONE: Connections from the same client IP may go to any instance in the pool.
588 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy.
589 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
590 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
591 "A String",
592 ],
593 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1].
594 #
595 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.
596 #
597 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400598 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700599 "A String",
600 ],
601 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
602 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
603 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700605 }
606
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
608
609For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
610
611The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700612
613Returns:
614 An object of the form:
615
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 { # Represents an Operation resource.
617 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 # Google Compute Engine has three Operation resources:
619 #
620 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
621 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
623 #
624 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 # - For global operations, use the `globalOperations` resource.
626 # - For regional operations, use the `regionOperations` resource.
627 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700628 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 # 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 -0700630 "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 -0700631 "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 -0400632 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700633 "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 -0700634 "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 -0700635 "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 -0700636 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
637 "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 -0700638 "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 -0700639 "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 -0700640 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 "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 -0700642 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
643 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
644 {
645 "message": "A String", # [Output Only] A human-readable description of the warning code.
646 "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.
647 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
648 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
649 {
650 "value": "A String", # [Output Only] A warning data value corresponding to the key.
651 "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).
652 },
653 ],
654 },
655 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700657 "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 -0700658 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
659 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700660 "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 -0700661 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
662 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
663 {
664 "message": "A String", # [Output Only] An optional, human-readable error message.
665 "code": "A String", # [Output Only] The error type identifier for this error.
666 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
667 },
668 ],
669 },
670 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
671 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800672 "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 -0700673 }</pre>
674</div>
675
676<div class="method">
677 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
678 <pre>Retrieves a list of target pools available to the specified project and region.
679
680Args:
681 project: string, Project ID for this request. (required)
682 region: string, Name of the region scoping this request. (required)
683 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
684
Dan O'Mearadd494642020-05-01 07:42:23 -0700685You 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 -0700686
Dan O'Mearadd494642020-05-01 07:42:23 -0700687Currently, only sorting by `name` or `creationTimestamp desc` is supported.
688 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`)
689 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.
690 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 -0700691
Dan O'Mearadd494642020-05-01 07:42:23 -0700692For 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 -0700693
Dan O'Mearadd494642020-05-01 07:42:23 -0700694You 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 -0700695
Dan O'Mearadd494642020-05-01 07:42:23 -0700696To 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 -0700697
698Returns:
699 An object of the form:
700
701 { # Contains a list of TargetPool resources.
702 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 "kind": "compute#targetPoolList", # [Output Only] Type of resource. Always compute#targetPoolList for lists of target pools.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700704 "items": [ # A list of TargetPool resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 { # Represents a Target Pool resource.
706 #
707 # Target pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools. (== resource_for {$api_version}.targetPools ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700708 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].
709 #
710 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.
711 #
712 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
713 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
714 "region": "A String", # [Output Only] URL of the region where the target pool resides.
715 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 "sessionAffinity": "A String", # Session affinity option, must be one of the following values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700717 # NONE: Connections from the same client IP may go to any instance in the pool.
718 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy.
719 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
720 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
721 "A String",
722 ],
723 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1].
724 #
725 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.
726 #
727 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400728 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700729 "A String",
730 ],
731 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
732 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
733 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700735 },
736 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 "warning": { # [Output Only] Informational warning message.
738 "message": "A String", # [Output Only] A human-readable description of the warning code.
739 "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.
740 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
741 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
742 {
743 "value": "A String", # [Output Only] A warning data value corresponding to the key.
744 "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).
745 },
746 ],
747 },
748 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700749 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
750 }</pre>
751</div>
752
753<div class="method">
754 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
755 <pre>Retrieves the next page of results.
756
757Args:
758 previous_request: The request for the previous page. (required)
759 previous_response: The response from the request for the previous page. (required)
760
761Returns:
762 A request object that you can call 'execute()' on to request the next
763 page. Returns None if there are no more items in the collection.
764 </pre>
765</div>
766
767<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700768 <code class="details" id="removeHealthCheck">removeHealthCheck(project, region, targetPool, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700769 <pre>Removes health check URL from a target pool.
770
771Args:
772 project: string, Project ID for this request. (required)
773 region: string, Name of the region for this request. (required)
774 targetPool: string, Name of the target pool to remove health checks from. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700775 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700776 The object takes the form of:
777
778{
779 "healthChecks": [ # Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs:
780 # - https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check
781 # - projects/project/global/httpHealthChecks/health-check
782 # - global/httpHealthChecks/health-check
783 { # A full or valid partial URL to a health check. For example, the following are valid URLs:
784 # - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check
785 # - projects/project-id/global/httpHealthChecks/health-check
786 # - global/httpHealthChecks/health-check
787 "healthCheck": "A String",
788 },
789 ],
790 }
791
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
793
794For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
795
796The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700797
798Returns:
799 An object of the form:
800
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700801 { # Represents an Operation resource.
802 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 # Google Compute Engine has three Operation resources:
804 #
805 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
806 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
808 #
809 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 # - For global operations, use the `globalOperations` resource.
811 # - For regional operations, use the `regionOperations` resource.
812 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700813 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700814 # 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 -0700815 "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 -0700816 "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 -0400817 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700818 "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 -0700819 "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 -0700820 "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 -0700821 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
822 "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 -0700823 "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 -0700824 "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 -0700825 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700826 "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 -0700827 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
828 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
829 {
830 "message": "A String", # [Output Only] A human-readable description of the warning code.
831 "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.
832 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
833 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
834 {
835 "value": "A String", # [Output Only] A warning data value corresponding to the key.
836 "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).
837 },
838 ],
839 },
840 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700842 "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 -0700843 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
844 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 "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 -0700846 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
847 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
848 {
849 "message": "A String", # [Output Only] An optional, human-readable error message.
850 "code": "A String", # [Output Only] The error type identifier for this error.
851 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
852 },
853 ],
854 },
855 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
856 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800857 "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 -0700858 }</pre>
859</div>
860
861<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700862 <code class="details" id="removeInstance">removeInstance(project, region, targetPool, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700863 <pre>Removes instance URL from a target pool.
864
865Args:
866 project: string, Project ID for this request. (required)
867 region: string, Name of the region scoping this request. (required)
868 targetPool: string, Name of the TargetPool resource to remove instances from. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700869 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700870 The object takes the form of:
871
872{
873 "instances": [ # URLs of the instances to be removed from target pool.
874 {
875 "instance": "A String", # The URL for a specific instance.
876 },
877 ],
878 }
879
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
881
882For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
883
884The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700885
886Returns:
887 An object of the form:
888
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 { # Represents an Operation resource.
890 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700891 # Google Compute Engine has three Operation resources:
892 #
893 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
894 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700895 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
896 #
897 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 # - For global operations, use the `globalOperations` resource.
899 # - For regional operations, use the `regionOperations` resource.
900 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700901 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700902 # 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 -0700903 "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 -0700904 "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 -0400905 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700906 "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 -0700907 "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 -0700908 "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 -0700909 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
910 "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 -0700911 "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 -0700912 "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 -0700913 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700914 "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 -0700915 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
916 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
917 {
918 "message": "A String", # [Output Only] A human-readable description of the warning code.
919 "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.
920 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
921 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
922 {
923 "value": "A String", # [Output Only] A warning data value corresponding to the key.
924 "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).
925 },
926 ],
927 },
928 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700930 "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 -0700931 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
932 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 "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 -0700934 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
935 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
936 {
937 "message": "A String", # [Output Only] An optional, human-readable error message.
938 "code": "A String", # [Output Only] The error type identifier for this error.
939 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
940 },
941 ],
942 },
943 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
944 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800945 "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 -0700946 }</pre>
947</div>
948
949<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700950 <code class="details" id="setBackup">setBackup(project, region, targetPool, body=None, failoverRatio=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700951 <pre>Changes a backup target pool's configurations.
952
953Args:
954 project: string, Project ID for this request. (required)
955 region: string, Name of the region scoping this request. (required)
956 targetPool: string, Name of the TargetPool resource to set a backup pool for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700957 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700958 The object takes the form of:
959
960{
961 "target": "A String",
962 }
963
964 failoverRatio: number, New failoverRatio value for the target pool.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700965 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
966
967For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
968
969The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700970
971Returns:
972 An object of the form:
973
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700974 { # Represents an Operation resource.
975 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 # Google Compute Engine has three Operation resources:
977 #
978 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
979 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700980 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
981 #
982 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700983 # - For global operations, use the `globalOperations` resource.
984 # - For regional operations, use the `regionOperations` resource.
985 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700987 # 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 -0700988 "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 -0700989 "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 -0400990 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700991 "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 -0700992 "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 -0700993 "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 -0700994 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
995 "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 -0700996 "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 -0700997 "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 -0700998 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700999 "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 -07001000 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1001 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1002 {
1003 "message": "A String", # [Output Only] A human-readable description of the warning code.
1004 "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.
1005 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1006 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1007 {
1008 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1009 "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).
1010 },
1011 ],
1012 },
1013 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001015 "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 -07001016 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1017 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 "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 -07001019 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1020 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1021 {
1022 "message": "A String", # [Output Only] An optional, human-readable error message.
1023 "code": "A String", # [Output Only] The error type identifier for this error.
1024 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1025 },
1026 ],
1027 },
1028 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1029 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001030 "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 -07001031 }</pre>
1032</div>
1033
1034<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001035 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001036 <pre>Returns permissions that a caller has on the specified resource.
1037
1038Args:
1039 project: string, Project ID for this request. (required)
1040 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001042 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001043 The object takes the form of:
1044
1045{
1046 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1047 "A String",
1048 ],
1049 }
1050
1051
1052Returns:
1053 An object of the form:
1054
1055 {
1056 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1057 "A String",
1058 ],
1059 }</pre>
1060</div>
1061
1062</body></html>