blob: e5bd327f30feddcfb23e3b6bb94e17287201ad02 [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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
John Asmuth614db982014-04-24 15:46:26 -0400124
125Returns:
126 An object of the form:
127
128 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;id&quot;: &quot;A String&quot;, # [Output Only] 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 { # Represents a Target Instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 #
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.
148 },
John Asmuth614db982014-04-24 15:46:26 -0400149 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 &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; }
John Asmuth614db982014-04-24 15:46:26 -0400154 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &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.
John Asmuth614db982014-04-24 15:46:26 -0400157 },
158 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
John Asmuth614db982014-04-24 15:46:26 -0400160 },
161 },
162 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700163 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700166 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
167 &quot;A String&quot;,
168 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &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; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700173 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 },
177 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 },
John Asmuth614db982014-04-24 15:46:26 -0400180 }</pre>
181</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.
220 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 # 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 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 # - For global operations, use the `globalOperations` resource.
229 # - For regional operations, use the `regionOperations` resource.
230 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 &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.
John Asmuth614db982014-04-24 15:46:26 -0400239 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &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.
John Asmuth614db982014-04-24 15:46:26 -0400243 },
244 ],
245 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 &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.
252 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
253 &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.
254 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
255 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
256 &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.
257 &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`.
258 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
259 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
260 &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.
261 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
262 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
263 {
264 &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.
265 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
266 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
267 {
268 &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).
269 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
270 },
271 ],
272 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
273 },
274 ],
275 &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.
John Asmuth614db982014-04-24 15:46:26 -0400276 }</pre>
277</div>
278
279<div class="method">
280 <code class="details" id="get">get(project, zone, targetInstance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700281 <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 -0400282
283Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800284 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400285 zone: string, Name of the zone scoping this request. (required)
286 targetInstance: string, Name of the TargetInstance resource to return. (required)
287
288Returns:
289 An object of the form:
290
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 { # Represents a Target Instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 #
293 # 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 ==)
294 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
295 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
296 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
297 &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:
298 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
299 # - projects/project/zones/zone/instances/instance
300 # - zones/zone/instances/instance
301 &quot;kind&quot;: &quot;compute#targetInstance&quot;, # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
302 &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.
303 &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.
304 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
305 &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.
306 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400307</div>
308
309<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400311 <pre>Creates a TargetInstance resource in the specified project and zone using the data included in the request.
312
313Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800314 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400315 zone: string, Name of the zone scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700316 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400317 The object takes the form of:
318
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319{ # Represents a Target Instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700320 #
321 # 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 ==)
322 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
323 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
324 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
325 &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:
326 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
327 # - projects/project/zones/zone/instances/instance
328 # - zones/zone/instances/instance
329 &quot;kind&quot;: &quot;compute#targetInstance&quot;, # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
330 &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.
331 &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.
332 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
333 &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.
334}
John Asmuth614db982014-04-24 15:46:26 -0400335
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 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.
337
338For 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.
339
340The 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 -0400341
342Returns:
343 An object of the form:
344
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 { # Represents an Operation resource.
346 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700347 # Google Compute Engine has three Operation resources:
348 #
349 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
350 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700351 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
352 #
353 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 # - For global operations, use the `globalOperations` resource.
355 # - For regional operations, use the `regionOperations` resource.
356 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700357 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700358 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
360 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
361 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
362 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
363 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
364 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400365 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
367 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
368 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400369 },
370 ],
371 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &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`.
373 &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.
374 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
375 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
376 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
377 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
378 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
379 &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.
380 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
381 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
382 &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.
383 &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`.
384 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
385 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
386 &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.
387 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
388 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
389 {
390 &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.
391 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
392 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
393 {
394 &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).
395 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
396 },
397 ],
398 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
399 },
400 ],
401 &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.
John Asmuth614db982014-04-24 15:46:26 -0400402 }</pre>
403</div>
404
405<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700406 <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 -0800407 <pre>Retrieves a list of TargetInstance resources available to the specified project and zone.
John Asmuth614db982014-04-24 15:46:26 -0400408
409Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800410 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400411 zone: string, Name of the zone scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700412 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 -0700413
Dan O'Mearadd494642020-05-01 07:42:23 -0700414For 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 -0700415
Dan O'Mearadd494642020-05-01 07:42:23 -0700416You 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 -0800417
Bu Sun Kim65020912020-05-20 12:08:20 -0700418To 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) ```
419 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`)
420 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
421
422You 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.
423
424Currently, only sorting by `name` or `creationTimestamp desc` is supported.
425 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700426 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
John Asmuth614db982014-04-24 15:46:26 -0400427
428Returns:
429 An object of the form:
430
431 { # Contains a list of TargetInstance resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
433 &quot;items&quot;: [ # A list of TargetInstance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700434 { # Represents a Target Instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 #
436 # 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 ==)
437 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
438 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
439 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
440 &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:
441 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
442 # - projects/project/zones/zone/instances/instance
443 # - zones/zone/instances/instance
444 &quot;kind&quot;: &quot;compute#targetInstance&quot;, # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
445 &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.
446 &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.
447 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
448 &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.
449 },
John Asmuth614db982014-04-24 15:46:26 -0400450 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 &quot;kind&quot;: &quot;compute#targetInstanceList&quot;, # Type of resource.
452 &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.
453 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
454 &quot;warning&quot;: { # [Output Only] Informational warning message.
455 &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.
456 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
457 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 &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).
460 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 },
462 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700464 },
John Asmuth614db982014-04-24 15:46:26 -0400465 }</pre>
466</div>
467
468<div class="method">
469 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
470 <pre>Retrieves the next page of results.
471
472Args:
473 previous_request: The request for the previous page. (required)
474 previous_response: The response from the request for the previous page. (required)
475
476Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400478 page. Returns None if there are no more items in the collection.
479 </pre>
480</div>
481
482</body></html>