blob: d57177486a6093f4593eab28b22969062dc54192 [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">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, zone, targetInstance, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040085<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>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040091<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">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070093 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Retrieves a list of TargetInstance resources available to the specified project and zone.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<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<h3>Method Details</h3>
99<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700100 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800101 <pre>Retrieves an aggregated list of target instances.
John Asmuth614db982014-04-24 15:46:26 -0400102
103Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700105 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
106
107You 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.
108
109Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400110 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)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800111 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 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 =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700113
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114For 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 -0700115
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116You 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 -0800117
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118To 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).
John Asmuth614db982014-04-24 15:46:26 -0400119
120Returns:
121 An object of the form:
122
123 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800124 "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 -0700125 "kind": "compute#targetInstanceAggregatedList", # Type of resource.
126 "items": { # A list of TargetInstance resources.
John Asmuth614db982014-04-24 15:46:26 -0400127 "a_key": { # Name of the scope containing this set of target instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 "targetInstances": [ # A list of target instances contained in this scope.
129 { # Represents a Target Instance resource.
130 #
131 # 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 beta.targetInstances ==) (== resource_for v1.targetInstances ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800132 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
133 "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 -0700134 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700135 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800136 "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:
137 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
138 # - projects/project/zones/zone/instances/instance
139 # - zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700140 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800141 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700142 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 "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.
John Asmuth614db982014-04-24 15:46:26 -0400144 },
145 ],
146 "warning": { # Informational warning which replaces the list of addresses when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800147 "message": "A String", # [Output Only] A human-readable description of the warning code.
148 "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.
149 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
150 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400151 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000152 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700153 "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).
John Asmuth614db982014-04-24 15:46:26 -0400154 },
155 ],
156 },
157 },
158 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 "warning": { # [Output Only] Informational warning message.
160 "message": "A String", # [Output Only] A human-readable description of the warning code.
161 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
162 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
163 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
164 {
165 "value": "A String", # [Output Only] A warning data value corresponding to the key.
166 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
167 },
168 ],
169 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700170 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
171 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400172 }</pre>
173</div>
174
175<div class="method">
176 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
177 <pre>Retrieves the next page of results.
178
179Args:
180 previous_request: The request for the previous page. (required)
181 previous_response: The response from the request for the previous page. (required)
182
183Returns:
184 A request object that you can call 'execute()' on to request the next
185 page. Returns None if there are no more items in the collection.
186 </pre>
187</div>
188
189<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190 <code class="details" id="delete">delete(project, zone, targetInstance, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400191 <pre>Deletes the specified TargetInstance resource.
192
193Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800194 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400195 zone: string, Name of the zone scoping this request. (required)
196 targetInstance: string, Name of the TargetInstance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 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.
198
199For 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.
200
201The 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 -0400202
203Returns:
204 An object of the form:
205
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 { # Represents an Operation resource.
207 #
208 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
209 #
210 # Operations can be global, regional or zonal.
211 # - For global operations, use the globalOperations resource.
212 # - For regional operations, use the regionOperations resource.
213 # - For zonal operations, use the zonalOperations resource.
214 #
215 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800216 "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 -0700217 "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 -0400218 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800219 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800221 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
222 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000223 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800224 "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.
225 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800226 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800227 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
228 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000229 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400230 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800231 "message": "A String", # [Output Only] A human-readable description of the warning code.
232 "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.
233 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
234 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400235 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000236 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700237 "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).
John Asmuth614db982014-04-24 15:46:26 -0400238 },
239 ],
240 },
241 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000242 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800243 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
244 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000245 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000247 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800248 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400249 {
Craig Citroe633be12015-03-02 13:40:36 -0800250 "message": "A String", # [Output Only] An optional, human-readable error message.
251 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700252 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400253 },
254 ],
255 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800256 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700257 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800258 "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.
John Asmuth614db982014-04-24 15:46:26 -0400259 }</pre>
260</div>
261
262<div class="method">
263 <code class="details" id="get">get(project, zone, targetInstance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 <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 -0400265
266Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800267 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400268 zone: string, Name of the zone scoping this request. (required)
269 targetInstance: string, Name of the TargetInstance resource to return. (required)
270
271Returns:
272 An object of the form:
273
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 { # Represents a Target Instance resource.
275 #
276 # 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 beta.targetInstances ==) (== resource_for v1.targetInstances ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800277 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
278 "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 -0700279 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700280 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800281 "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:
282 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
283 # - projects/project/zones/zone/instances/instance
284 # - zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700285 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800286 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700287 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 "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.
John Asmuth614db982014-04-24 15:46:26 -0400289 }</pre>
290</div>
291
292<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700293 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400294 <pre>Creates a TargetInstance resource in the specified project and zone using the data included in the request.
295
296Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800297 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400298 zone: string, Name of the zone scoping this request. (required)
299 body: object, The request body. (required)
300 The object takes the form of:
301
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302{ # Represents a Target Instance resource.
303 #
304 # 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 beta.targetInstances ==) (== resource_for v1.targetInstances ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
306 "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 -0700307 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700308 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800309 "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:
310 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
311 # - projects/project/zones/zone/instances/instance
312 # - zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700313 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800314 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700315 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 "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.
John Asmuth614db982014-04-24 15:46:26 -0400317 }
318
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 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.
320
321For 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.
322
323The 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 -0400324
325Returns:
326 An object of the form:
327
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 { # Represents an Operation resource.
329 #
330 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
331 #
332 # Operations can be global, regional or zonal.
333 # - For global operations, use the globalOperations resource.
334 # - For regional operations, use the regionOperations resource.
335 # - For zonal operations, use the zonalOperations resource.
336 #
337 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800338 "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 -0700339 "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 -0400340 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800341 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800343 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
344 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000345 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800346 "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.
347 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800348 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800349 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
350 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000351 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400352 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800353 "message": "A String", # [Output Only] A human-readable description of the warning code.
354 "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.
355 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
356 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400357 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000358 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700359 "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).
John Asmuth614db982014-04-24 15:46:26 -0400360 },
361 ],
362 },
363 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000364 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800365 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
366 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000367 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700368 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000369 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800370 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400371 {
Craig Citroe633be12015-03-02 13:40:36 -0800372 "message": "A String", # [Output Only] An optional, human-readable error message.
373 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700374 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400375 },
376 ],
377 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800378 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700379 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800380 "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.
John Asmuth614db982014-04-24 15:46:26 -0400381 }</pre>
382</div>
383
384<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700385 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800386 <pre>Retrieves a list of TargetInstance resources available to the specified project and zone.
John Asmuth614db982014-04-24 15:46:26 -0400387
388Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800389 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400390 zone: string, Name of the zone scoping this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700391 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
392
393You 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.
394
395Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400396 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)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800397 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700398 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 =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700399
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400For 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 -0700401
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402You 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 -0800403
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700404To 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).
John Asmuth614db982014-04-24 15:46:26 -0400405
406Returns:
407 An object of the form:
408
409 { # Contains a list of TargetInstance resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800410 "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 -0700411 "kind": "compute#targetInstanceList", # Type of resource.
Craig Citroe633be12015-03-02 13:40:36 -0800412 "items": [ # A list of TargetInstance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 { # Represents a Target Instance resource.
414 #
415 # 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 beta.targetInstances ==) (== resource_for v1.targetInstances ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800416 "kind": "compute#targetInstance", # [Output Only] The type of the resource. Always compute#targetInstance for target instances.
417 "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 -0700418 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700419 "natPolicy": "A String", # NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800420 "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:
421 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
422 # - projects/project/zones/zone/instances/instance
423 # - zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700424 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800425 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700426 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 "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.
John Asmuth614db982014-04-24 15:46:26 -0400428 },
429 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 "warning": { # [Output Only] Informational warning message.
431 "message": "A String", # [Output Only] A human-readable description of the warning code.
432 "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.
433 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
434 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
435 {
436 "value": "A String", # [Output Only] A warning data value corresponding to the key.
437 "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).
438 },
439 ],
440 },
441 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700442 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400443 }</pre>
444</div>
445
446<div class="method">
447 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
448 <pre>Retrieves the next page of results.
449
450Args:
451 previous_request: The request for the previous page. (required)
452 previous_response: The response from the request for the previous page. (required)
453
454Returns:
455 A request object that you can call 'execute()' on to request the next
456 page. Returns None if there are no more items in the collection.
457 </pre>
458</div>
459
460</body></html>