blob: 335ae6d5d46356a4b047233ef013d8a4f87e33d5 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.targetInstances.html">targetInstances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Retrieves an aggregated list of target instances.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, zone, targetInstance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified TargetInstance resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, zone, targetInstance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Creates a TargetInstance resource in the specified project and zone using the data included in the request.</p>
92<p class="toc_element">
93 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
94<p class="firstline">Retrieves a list of TargetInstance resources available to the specified project and zone.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
101<h3>Method Details</h3>
102<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104 <pre>Retrieves an aggregated list of target instances.
105
106Args:
107 project: string, Project ID for this request. (required)
108 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
109
Dan O'Mearadd494642020-05-01 07:42:23 -0700110You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700111
Dan O'Mearadd494642020-05-01 07:42:23 -0700112Currently, only sorting by `name` or `creationTimestamp desc` is supported.
113 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`)
114 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.
115 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116
Dan O'Mearadd494642020-05-01 07:42:23 -0700117For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118
Dan O'Mearadd494642020-05-01 07:42:23 -0700119You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700120
Dan O'Mearadd494642020-05-01 07:42:23 -0700121To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
122 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700123
124Returns:
125 An object of the form:
126
127 {
128 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 "kind": "compute#targetInstanceAggregatedList", # Type of resource.
130 "items": { # A list of TargetInstance resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700131 "a_key": { # Name of the scope containing this set of target instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 "targetInstances": [ # A list of target instances contained in this scope.
133 { # Represents a Target Instance resource.
134 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 # 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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700136 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
137 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 "zone": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700139 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
140 "instance": "A String", # 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:
141 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
142 # - projects/project/zones/zone/instances/instance
143 # - zones/zone/instances/instance
144 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
145 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
146 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700148 },
149 ],
150 "warning": { # Informational warning which replaces the list of addresses when the list is empty.
151 "message": "A String", # [Output Only] A human-readable description of the warning code.
152 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
153 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
154 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
155 {
156 "value": "A String", # [Output Only] A warning data value corresponding to the key.
157 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
158 },
159 ],
160 },
161 },
162 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "warning": { # [Output Only] Informational warning message.
164 "message": "A String", # [Output Only] A human-readable description of the warning code.
165 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
166 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
167 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
168 {
169 "value": "A String", # [Output Only] A warning data value corresponding to the key.
170 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
171 },
172 ],
173 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700174 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
175 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
176 }</pre>
177</div>
178
179<div class="method">
180 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
181 <pre>Retrieves the next page of results.
182
183Args:
184 previous_request: The request for the previous page. (required)
185 previous_response: The response from the request for the previous page. (required)
186
187Returns:
188 A request object that you can call 'execute()' on to request the next
189 page. Returns None if there are no more items in the collection.
190 </pre>
191</div>
192
193<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 <code class="details" id="delete">delete(project, zone, targetInstance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700195 <pre>Deletes the specified TargetInstance resource.
196
197Args:
198 project: string, Project ID for this request. (required)
199 zone: string, Name of the zone scoping this request. (required)
200 targetInstance: string, Name of the TargetInstance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 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.
202
203For 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.
204
205The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700206
207Returns:
208 An object of the form:
209
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 { # Represents an Operation resource.
211 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 # Google Compute Engine has three Operation resources:
213 #
214 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
215 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
217 #
218 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 # - For global operations, use the `globalOperations` resource.
220 # - For regional operations, use the `regionOperations` resource.
221 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700224 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400226 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700227 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700229 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
231 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700232 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700235 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700236 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
237 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
238 {
239 "message": "A String", # [Output Only] A human-readable description of the warning code.
240 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
241 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
242 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
243 {
244 "value": "A String", # [Output Only] A warning data value corresponding to the key.
245 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
246 },
247 ],
248 },
249 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700250 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700251 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700252 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
253 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700255 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
256 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
257 {
258 "message": "A String", # [Output Only] An optional, human-readable error message.
259 "code": "A String", # [Output Only] The error type identifier for this error.
260 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
261 },
262 ],
263 },
264 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
265 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800266 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700267 }</pre>
268</div>
269
270<div class="method">
271 <code class="details" id="get">get(project, zone, targetInstance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 <pre>Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700273
274Args:
275 project: string, Project ID for this request. (required)
276 zone: string, Name of the zone scoping this request. (required)
277 targetInstance: string, Name of the TargetInstance resource to return. (required)
278
279Returns:
280 An object of the form:
281
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 { # Represents a Target Instance resource.
283 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700284 # 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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700285 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
286 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 "zone": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700288 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
289 "instance": "A String", # 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:
290 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
291 # - projects/project/zones/zone/instances/instance
292 # - zones/zone/instances/instance
293 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
294 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
295 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700297 }</pre>
298</div>
299
300<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700302 <pre>Creates a TargetInstance resource in the specified project and zone using the data included in the request.
303
304Args:
305 project: string, Project ID for this request. (required)
306 zone: string, Name of the zone scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700307 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700308 The object takes the form of:
309
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310{ # Represents a Target Instance resource.
311 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 # 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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700313 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
314 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 "zone": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700316 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
317 "instance": "A String", # 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:
318 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
319 # - projects/project/zones/zone/instances/instance
320 # - zones/zone/instances/instance
321 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
322 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
323 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700325 }
326
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 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.
328
329For 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.
330
331The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700332
333Returns:
334 An object of the form:
335
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 { # Represents an Operation resource.
337 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700338 # Google Compute Engine has three Operation resources:
339 #
340 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
341 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
343 #
344 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700345 # - For global operations, use the `globalOperations` resource.
346 # - For regional operations, use the `regionOperations` resource.
347 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700350 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700351 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400352 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700353 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700355 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
357 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700358 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700360 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700362 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
363 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
364 {
365 "message": "A String", # [Output Only] A human-readable description of the warning code.
366 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
367 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
368 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
369 {
370 "value": "A String", # [Output Only] A warning data value corresponding to the key.
371 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
372 },
373 ],
374 },
375 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700377 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
379 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700380 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700381 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
382 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
383 {
384 "message": "A String", # [Output Only] An optional, human-readable error message.
385 "code": "A String", # [Output Only] The error type identifier for this error.
386 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
387 },
388 ],
389 },
390 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
391 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800392 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700393 }</pre>
394</div>
395
396<div class="method">
397 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
398 <pre>Retrieves a list of TargetInstance resources available to the specified project and zone.
399
400Args:
401 project: string, Project ID for this request. (required)
402 zone: string, Name of the zone scoping this request. (required)
403 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
404
Dan O'Mearadd494642020-05-01 07:42:23 -0700405You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700406
Dan O'Mearadd494642020-05-01 07:42:23 -0700407Currently, only sorting by `name` or `creationTimestamp desc` is supported.
408 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`)
409 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.
410 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700411
Dan O'Mearadd494642020-05-01 07:42:23 -0700412For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700413
Dan O'Mearadd494642020-05-01 07:42:23 -0700414You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415
Dan O'Mearadd494642020-05-01 07:42:23 -0700416To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700417
418Returns:
419 An object of the form:
420
421 { # Contains a list of TargetInstance resources.
422 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 "kind": "compute#targetInstanceList", # Type of resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700424 "items": [ # A list of TargetInstance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 { # Represents a Target Instance resource.
426 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700427 # 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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700428 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
429 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 "zone": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700431 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
432 "instance": "A String", # 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:
433 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
434 # - projects/project/zones/zone/instances/instance
435 # - zones/zone/instances/instance
436 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
437 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
438 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700440 },
441 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 "warning": { # [Output Only] Informational warning message.
443 "message": "A String", # [Output Only] A human-readable description of the warning code.
444 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
445 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
446 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
447 {
448 "value": "A String", # [Output Only] A warning data value corresponding to the key.
449 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
450 },
451 ],
452 },
453 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700454 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
455 }</pre>
456</div>
457
458<div class="method">
459 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
460 <pre>Retrieves the next page of results.
461
462Args:
463 previous_request: The request for the previous page. (required)
464 previous_response: The response from the request for the previous page. (required)
465
466Returns:
467 A request object that you can call 'execute()' on to request the next
468 page. Returns None if there are no more items in the collection.
469 </pre>
470</div>
471
472<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700473 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 <pre>Returns permissions that a caller has on the specified resource.
475
476Args:
477 project: string, Project ID for this request. (required)
478 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700480 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700481 The object takes the form of:
482
483{
484 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
485 "A String",
486 ],
487 }
488
489
490Returns:
491 An object of the form:
492
493 {
494 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
495 "A String",
496 ],
497 }</pre>
498</div>
499
500</body></html>