blob: 5b902ef54ea4e54dfdea9f62bb67a6f1b658e007 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v1.html">Compute Engine API</a> . <a href="compute_v1.targetInstances.html">targetInstances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Retrieves an aggregated list of target instances.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, zone, targetInstance, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040088<p class="firstline">Deletes the specified TargetInstance resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, zone, targetInstance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040094<p class="firstline">Creates a TargetInstance resource in the specified project and zone using the data included in the request.</p>
95<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070096 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Retrieves a list of TargetInstance resources available to the specified project and zone.</p>
John Asmuth614db982014-04-24 15:46:26 -040098<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<h3>Method Details</h3>
102<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104 <pre>Retrieves an aggregated list of target instances.
John Asmuth614db982014-04-24 15:46:26 -0400105
106Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800107 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700109
Dan O'Mearadd494642020-05-01 07:42:23 -0700110For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700111
Dan O'Mearadd494642020-05-01 07:42:23 -0700112You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800113
Bu Sun Kim65020912020-05-20 12:08:20 -0700114To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700116 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
117 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
118
119You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
120
121Currently, only sorting by `name` or `creationTimestamp desc` is supported.
122 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800123 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
John Asmuth614db982014-04-24 15:46:26 -0400124
125Returns:
126 An object of the form:
127
128 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800129 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
130 &quot;items&quot;: { # A list of TargetInstance resources.
131 &quot;a_key&quot;: { # Name of the scope containing this set of target instances.
132 &quot;targetInstances&quot;: [ # A list of target instances contained in this scope.
133 { # Represents a Target Instance resource.
134 #
135 # You can use a target instance to handle traffic for one or more forwarding rules, which is ideal for forwarding protocol traffic that is managed by a single source. For example, ESP, AH, TCP, or UDP. For more information, read Target instances. (== resource_for {$api_version}.targetInstances ==)
136 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
137 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
138 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
139 &quot;instance&quot;: &quot;A String&quot;, # A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs:
140 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
141 # - projects/project/zones/zone/instances/instance
142 # - zones/zone/instances/instance
143 &quot;kind&quot;: &quot;compute#targetInstance&quot;, # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
144 &quot;name&quot;: &quot;A String&quot;, # 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.
145 &quot;natPolicy&quot;: &quot;A String&quot;, # NAT option controlling how IPs are NAT&#x27;ed to the instance. Currently only NO_NAT (default value) is supported.
146 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
147 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the target instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 },
149 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800150 &quot;warning&quot;: { # Informational warning which replaces the list of addresses when the list is empty.
151 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
152 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
153 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
154 {
155 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
156 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
157 },
158 ],
159 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
160 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800162 },
163 &quot;kind&quot;: &quot;compute#targetInstanceAggregatedList&quot;, # Type of resource.
164 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
165 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
166 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
167 &quot;A String&quot;,
168 ],
169 &quot;warning&quot;: { # [Output Only] Informational warning message.
170 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
171 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
172 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
173 {
174 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
175 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
176 },
177 ],
178 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
179 },
180}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400181</div>
182
183<div class="method">
184 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
185 <pre>Retrieves the next page of results.
186
187Args:
188 previous_request: The request for the previous page. (required)
189 previous_response: The response from the request for the previous page. (required)
190
191Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400193 page. Returns None if there are no more items in the collection.
194 </pre>
195</div>
196
197<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700198 <code class="details" id="close">close()</code>
199 <pre>Close httplib2 connections.</pre>
200</div>
201
202<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 <code class="details" id="delete">delete(project, zone, targetInstance, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400204 <pre>Deletes the specified TargetInstance resource.
205
206Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800207 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400208 zone: string, Name of the zone scoping this request. (required)
209 targetInstance: string, Name of the TargetInstance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 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.
211
212For 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.
213
214The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400215
216Returns:
217 An object of the form:
218
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800220 #
221 # Google Compute Engine has three Operation resources:
222 #
223 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
224 #
225 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
226 #
227 # Operations can be global, regional or zonal.
228 # - For global operations, use the `globalOperations` resource.
229 # - For regional operations, use the `regionOperations` resource.
230 # - For zonal operations, use the `zonalOperations` resource.
231 #
232 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
233 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
234 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
235 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
236 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
237 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
238 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800240 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
241 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
242 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 },
244 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800245 },
246 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
247 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
248 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
249 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
250 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
251 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800252 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800253 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
254 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
255 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
256 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
257 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
258 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
259 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
260 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
261 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
262 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
263 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
264 {
265 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
266 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
267 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
268 {
269 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
270 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
271 },
272 ],
273 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
274 },
275 ],
276 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
277}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400278</div>
279
280<div class="method">
281 <code class="details" id="get">get(project, zone, targetInstance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 <pre>Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -0400283
284Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800285 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400286 zone: string, Name of the zone scoping this request. (required)
287 targetInstance: string, Name of the TargetInstance resource to return. (required)
288
289Returns:
290 An object of the form:
291
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 { # Represents a Target Instance resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800293 #
294 # You can use a target instance to handle traffic for one or more forwarding rules, which is ideal for forwarding protocol traffic that is managed by a single source. For example, ESP, AH, TCP, or UDP. For more information, read Target instances. (== resource_for {$api_version}.targetInstances ==)
295 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
296 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
297 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
298 &quot;instance&quot;: &quot;A String&quot;, # A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs:
299 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
300 # - projects/project/zones/zone/instances/instance
301 # - zones/zone/instances/instance
302 &quot;kind&quot;: &quot;compute#targetInstance&quot;, # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
303 &quot;name&quot;: &quot;A String&quot;, # 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.
304 &quot;natPolicy&quot;: &quot;A String&quot;, # NAT option controlling how IPs are NAT&#x27;ed to the instance. Currently only NO_NAT (default value) is supported.
305 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
306 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the target instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
307}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400308</div>
309
310<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700311 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400312 <pre>Creates a TargetInstance resource in the specified project and zone using the data included in the request.
313
314Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800315 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400316 zone: string, Name of the zone scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700317 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400318 The object takes the form of:
319
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320{ # Represents a Target Instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 #
322 # You can use a target instance to handle traffic for one or more forwarding rules, which is ideal for forwarding protocol traffic that is managed by a single source. For example, ESP, AH, TCP, or UDP. For more information, read Target instances. (== resource_for {$api_version}.targetInstances ==)
323 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
324 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
325 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
326 &quot;instance&quot;: &quot;A String&quot;, # A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs:
327 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
328 # - projects/project/zones/zone/instances/instance
329 # - zones/zone/instances/instance
330 &quot;kind&quot;: &quot;compute#targetInstance&quot;, # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
331 &quot;name&quot;: &quot;A String&quot;, # 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.
332 &quot;natPolicy&quot;: &quot;A String&quot;, # NAT option controlling how IPs are NAT&#x27;ed to the instance. Currently only NO_NAT (default value) is supported.
333 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
334 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the target instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
335}
John Asmuth614db982014-04-24 15:46:26 -0400336
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 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.
338
339For 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.
340
341The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400342
343Returns:
344 An object of the form:
345
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800347 #
348 # Google Compute Engine has three Operation resources:
349 #
350 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
351 #
352 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
353 #
354 # Operations can be global, regional or zonal.
355 # - For global operations, use the `globalOperations` resource.
356 # - For regional operations, use the `regionOperations` resource.
357 # - For zonal operations, use the `zonalOperations` resource.
358 #
359 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
360 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
361 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
362 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
363 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
364 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
365 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800367 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
368 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
369 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 },
371 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800372 },
373 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
374 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
375 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
376 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
377 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
378 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800379 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800380 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
381 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
382 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
383 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
384 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
385 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
386 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
387 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
388 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
389 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
390 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
391 {
392 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
393 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
394 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
395 {
396 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
397 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
398 },
399 ],
400 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
401 },
402 ],
403 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
404}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400405</div>
406
407<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700408 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800409 <pre>Retrieves a list of TargetInstance resources available to the specified project and zone.
John Asmuth614db982014-04-24 15:46:26 -0400410
411Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800412 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400413 zone: string, Name of the zone scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 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;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700415
Dan O'Mearadd494642020-05-01 07:42:23 -0700416For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700417
Dan O'Mearadd494642020-05-01 07:42:23 -0700418You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800419
Bu Sun Kim65020912020-05-20 12:08:20 -0700420To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
421 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`)
422 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
423
424You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
425
426Currently, only sorting by `name` or `creationTimestamp desc` is supported.
427 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800428 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
John Asmuth614db982014-04-24 15:46:26 -0400429
430Returns:
431 An object of the form:
432
433 { # Contains a list of TargetInstance resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800434 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
435 &quot;items&quot;: [ # A list of TargetInstance resources.
436 { # Represents a Target Instance resource.
437 #
438 # You can use a target instance to handle traffic for one or more forwarding rules, which is ideal for forwarding protocol traffic that is managed by a single source. For example, ESP, AH, TCP, or UDP. For more information, read Target instances. (== resource_for {$api_version}.targetInstances ==)
439 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
440 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
441 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
442 &quot;instance&quot;: &quot;A String&quot;, # A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs:
443 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
444 # - projects/project/zones/zone/instances/instance
445 # - zones/zone/instances/instance
446 &quot;kind&quot;: &quot;compute#targetInstance&quot;, # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
447 &quot;name&quot;: &quot;A String&quot;, # 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.
448 &quot;natPolicy&quot;: &quot;A String&quot;, # NAT option controlling how IPs are NAT&#x27;ed to the instance. Currently only NO_NAT (default value) is supported.
449 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
450 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the target instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
451 },
452 ],
453 &quot;kind&quot;: &quot;compute#targetInstanceList&quot;, # Type of resource.
454 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
455 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
456 &quot;warning&quot;: { # [Output Only] Informational warning message.
457 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
458 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
459 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
460 {
461 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
462 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 },
John Asmuth614db982014-04-24 15:46:26 -0400464 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800465 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
466 },
467}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400468</div>
469
470<div class="method">
471 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
472 <pre>Retrieves the next page of results.
473
474Args:
475 previous_request: The request for the previous page. (required)
476 previous_response: The response from the request for the previous page. (required)
477
478Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400480 page. Returns None if there are no more items in the collection.
481 </pre>
482</div>
483
484</body></html>