blob: 1ef258f9cdd39e67985aa93e0129a688ce82d9e3 [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.routes.html">routes</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, route)</a></code></p>
79<p class="firstline">Deletes the specified route resource.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, route)</a></code></p>
82<p class="firstline">Returns the specified route resource.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(project, body)</a></code></p>
85<p class="firstline">Creates a route resource in the specified project using the data included in the request.</p>
86<p class="toc_element">
87 <code><a href="#list">list(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
88<p class="firstline">Retrieves the list of route resources available to the specified project.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="delete">delete(project, route)</code>
95 <pre>Deletes the specified route resource.
96
97Args:
98 project: string, Name of the project scoping this request. (required)
99 route: string, Name of the route resource to delete. (required)
100
101Returns:
102 An object of the form:
103
104 { # An operation resource, used to manage asynchronous API requests.
105 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
106 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
107 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
108 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
109 "zone": "A String", # URL of the zone where the operation resides (output only).
110 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
111 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
112 "progress": 42, # 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 at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
113 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
114 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
115 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
116 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
117 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
118 {
119 "message": "A String", # Optional human-readable details for this warning.
120 "code": "A String", # The warning type identifier for this warning.
121 "data": [ # Metadata for this warning in 'key: value' format.
122 {
123 "value": "A String", # A warning data value corresponding to the key.
124 "key": "A String", # A key for the warning data.
125 },
126 ],
127 },
128 ],
129 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
130 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
131 "kind": "compute#operation", # Type of the resource.
132 "name": "A String", # Name of the resource (output only).
133 "region": "A String", # URL of the region where the operation resides (output only).
134 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
135 "errors": [ # The array of errors encountered while processing this operation.
136 {
137 "message": "A String", # An optional, human-readable error message.
138 "code": "A String", # The error type identifier for this error.
139 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
140 },
141 ],
142 },
143 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
144 "selfLink": "A String", # Server defined URL for the resource (output only).
145 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
146 }</pre>
147</div>
148
149<div class="method">
150 <code class="details" id="get">get(project, route)</code>
151 <pre>Returns the specified route resource.
152
153Args:
154 project: string, Name of the project scoping this request. (required)
155 route: string, Name of the route resource to return. (required)
156
157Returns:
158 An object of the form:
159
160 { # The route resource. A Route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with VMs by tag and the set of Routes for a particular VM is called its routing table. For each packet leaving a VM, the system searches that VM's routing table for a single best matching Route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the Route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching Routes. The packet is then forwarded as specified by the next_hop field of the winning Route -- either to another VM destination, a VM gateway or a GCE operated gateway. Packets that do not match any Route in the sending VM's routing table will be dropped.
161 "nextHopGateway": "A String", # The URL to a gateway that should handle matching packets.
162 "priority": 42, # Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values.
163 "kind": "compute#route", # Type of the resource.
164 "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.
165 "tags": [ # A list of instance tags to which this route applies.
166 "A String",
167 ],
168 "nextHopInstance": "A String", # The URL to an instance that should handle matching packets.
169 "warnings": [ # If potential misconfigurations are detected for this route, this field will be populated with warning messages.
170 {
171 "message": "A String", # Optional human-readable details for this warning.
172 "code": "A String", # The warning type identifier for this warning.
173 "data": [ # Metadata for this warning in 'key: value' format.
174 {
175 "value": "A String", # A warning data value corresponding to the key.
176 "key": "A String", # A key for the warning data.
177 },
178 ],
179 },
180 ],
181 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
182 "network": "A String", # URL of the network to which this route is applied; provided by the client when the route is created.
183 "selfLink": "A String", # Server defined URL for the resource (output only).
184 "destRange": "A String", # Which packets does this route apply to?
185 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
186 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
187 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets.
188 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
189 }</pre>
190</div>
191
192<div class="method">
193 <code class="details" id="insert">insert(project, body)</code>
194 <pre>Creates a route resource in the specified project using the data included in the request.
195
196Args:
197 project: string, Name of the project scoping this request. (required)
198 body: object, The request body. (required)
199 The object takes the form of:
200
201{ # The route resource. A Route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with VMs by tag and the set of Routes for a particular VM is called its routing table. For each packet leaving a VM, the system searches that VM's routing table for a single best matching Route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the Route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching Routes. The packet is then forwarded as specified by the next_hop field of the winning Route -- either to another VM destination, a VM gateway or a GCE operated gateway. Packets that do not match any Route in the sending VM's routing table will be dropped.
202 "nextHopGateway": "A String", # The URL to a gateway that should handle matching packets.
203 "priority": 42, # Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values.
204 "kind": "compute#route", # Type of the resource.
205 "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.
206 "tags": [ # A list of instance tags to which this route applies.
207 "A String",
208 ],
209 "nextHopInstance": "A String", # The URL to an instance that should handle matching packets.
210 "warnings": [ # If potential misconfigurations are detected for this route, this field will be populated with warning messages.
211 {
212 "message": "A String", # Optional human-readable details for this warning.
213 "code": "A String", # The warning type identifier for this warning.
214 "data": [ # Metadata for this warning in 'key: value' format.
215 {
216 "value": "A String", # A warning data value corresponding to the key.
217 "key": "A String", # A key for the warning data.
218 },
219 ],
220 },
221 ],
222 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
223 "network": "A String", # URL of the network to which this route is applied; provided by the client when the route is created.
224 "selfLink": "A String", # Server defined URL for the resource (output only).
225 "destRange": "A String", # Which packets does this route apply to?
226 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
227 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
228 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets.
229 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
230 }
231
232
233Returns:
234 An object of the form:
235
236 { # An operation resource, used to manage asynchronous API requests.
237 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
238 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
239 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
240 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
241 "zone": "A String", # URL of the zone where the operation resides (output only).
242 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
243 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
244 "progress": 42, # 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 at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
245 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
246 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
247 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
248 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
249 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
250 {
251 "message": "A String", # Optional human-readable details for this warning.
252 "code": "A String", # The warning type identifier for this warning.
253 "data": [ # Metadata for this warning in 'key: value' format.
254 {
255 "value": "A String", # A warning data value corresponding to the key.
256 "key": "A String", # A key for the warning data.
257 },
258 ],
259 },
260 ],
261 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
262 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
263 "kind": "compute#operation", # Type of the resource.
264 "name": "A String", # Name of the resource (output only).
265 "region": "A String", # URL of the region where the operation resides (output only).
266 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
267 "errors": [ # The array of errors encountered while processing this operation.
268 {
269 "message": "A String", # An optional, human-readable error message.
270 "code": "A String", # The error type identifier for this error.
271 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
272 },
273 ],
274 },
275 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
276 "selfLink": "A String", # Server defined URL for the resource (output only).
277 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
278 }</pre>
279</div>
280
281<div class="method">
282 <code class="details" id="list">list(project, maxResults=None, pageToken=None, filter=None)</code>
283 <pre>Retrieves the list of route resources available to the specified project.
284
285Args:
286 project: string, Name of the project scoping this request. (required)
287 maxResults: integer, Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
288 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
289 filter: string, Optional. Filter expression for filtering listed resources.
290
291Returns:
292 An object of the form:
293
294 { # Contains a list of route resources.
295 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
296 "items": [ # The route resources.
297 { # The route resource. A Route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with VMs by tag and the set of Routes for a particular VM is called its routing table. For each packet leaving a VM, the system searches that VM's routing table for a single best matching Route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the Route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching Routes. The packet is then forwarded as specified by the next_hop field of the winning Route -- either to another VM destination, a VM gateway or a GCE operated gateway. Packets that do not match any Route in the sending VM's routing table will be dropped.
298 "nextHopGateway": "A String", # The URL to a gateway that should handle matching packets.
299 "priority": 42, # Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values.
300 "kind": "compute#route", # Type of the resource.
301 "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.
302 "tags": [ # A list of instance tags to which this route applies.
303 "A String",
304 ],
305 "nextHopInstance": "A String", # The URL to an instance that should handle matching packets.
306 "warnings": [ # If potential misconfigurations are detected for this route, this field will be populated with warning messages.
307 {
308 "message": "A String", # Optional human-readable details for this warning.
309 "code": "A String", # The warning type identifier for this warning.
310 "data": [ # Metadata for this warning in 'key: value' format.
311 {
312 "value": "A String", # A warning data value corresponding to the key.
313 "key": "A String", # A key for the warning data.
314 },
315 ],
316 },
317 ],
318 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
319 "network": "A String", # URL of the network to which this route is applied; provided by the client when the route is created.
320 "selfLink": "A String", # Server defined URL for the resource (output only).
321 "destRange": "A String", # Which packets does this route apply to?
322 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
323 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
324 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets.
325 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
326 },
327 ],
328 "kind": "compute#routeList", # Type of resource.
329 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
330 "selfLink": "A String", # Server defined URL for this resource (output only).
331 }</pre>
332</div>
333
334<div class="method">
335 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
336 <pre>Retrieves the next page of results.
337
338Args:
339 previous_request: The request for the previous page. (required)
340 previous_response: The response from the request for the previous page. (required)
341
342Returns:
343 A request object that you can call 'execute()' on to request the next
344 page. Returns None if there are no more items in the collection.
345 </pre>
346</div>
347
348</body></html>