blob: 7466d4caf6d788a333d63f26c90cdd8baad45d2c [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -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_v1.html">Compute Engine API</a> . <a href="compute_v1.routers.html">routers</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 Parrott7d5badb2016-08-16 12:44:29 -070079<p class="firstline">Retrieves an aggregated list of routers.</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">
84 <code><a href="#delete">delete(project, region, router)</a></code></p>
85<p class="firstline">Deletes the specified Router resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, router)</a></code></p>
88<p class="firstline">Returns the specified Router resource. Get a list of available routers by making a list() request.</p>
89<p class="toc_element">
90 <code><a href="#getRouterStatus">getRouterStatus(project, region, router)</a></code></p>
91<p class="firstline">Retrieves runtime information of the specified router.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(project, region, body)</a></code></p>
94<p class="firstline">Creates a Router resource in the specified project and region using the data included in the request.</p>
95<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070096 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070097<p class="firstline">Retrieves a list of Router resources available to the specified project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#patch">patch(project, region, router, body)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700103<p class="firstline">Updates the specified Router resource with the data included in the request. This method supports patch semantics.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700104<p class="toc_element">
105 <code><a href="#preview">preview(project, region, router, body)</a></code></p>
106<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
107<p class="toc_element">
108 <code><a href="#update">update(project, region, router, body)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700109<p class="firstline">Updates the specified Router resource with the data included in the request.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700110<h3>Method Details</h3>
111<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700112 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700113 <pre>Retrieves an aggregated list of routers.
114
115Args:
116 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700117 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
118
119You can also sort results in descending order based on the creation timestamp using orderBy="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.
120
121Currently, only sorting by name or creationTimestamp desc is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700122 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.
123 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.
124 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
125
126The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
127
128For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
129
130You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
131
132To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
133
134Returns:
135 An object of the form:
136
137 { # Contains a list of routers.
138 "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.
139 "items": { # A map of scoped router lists.
140 "a_key": { # Name of the scope containing this set of routers.
141 "routers": [ # List of routers contained in this scope.
142 { # Router resource.
143 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
144 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700146 {
147 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
148 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
149 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
150 },
151 ],
152 "bgp": { # BGP information specific to this router.
153 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
154 },
155 "network": "A String", # URI of the network to which this router belongs.
156 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
157 {
158 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
159 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
160 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
161 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
162 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
163 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
164 },
165 ],
166 "region": "A String", # [Output Only] URI of the region where the router resides.
167 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
168 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
169 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
170 "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.
171 },
172 ],
173 "warning": { # Informational warning which replaces the list of routers when the list is empty.
174 "message": "A String", # [Output Only] A human-readable description of the warning code.
175 "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.
176 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
177 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
178 {
179 "value": "A String", # [Output Only] A warning data value corresponding to the key.
180 "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).
181 },
182 ],
183 },
184 },
185 },
186 "kind": "compute#routerAggregatedList", # Type of resource.
187 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
188 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
189 }</pre>
190</div>
191
192<div class="method">
193 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
194 <pre>Retrieves the next page of results.
195
196Args:
197 previous_request: The request for the previous page. (required)
198 previous_response: The response from the request for the previous page. (required)
199
200Returns:
201 A request object that you can call 'execute()' on to request the next
202 page. Returns None if there are no more items in the collection.
203 </pre>
204</div>
205
206<div class="method">
207 <code class="details" id="delete">delete(project, region, router)</code>
208 <pre>Deletes the specified Router resource.
209
210Args:
211 project: string, Project ID for this request. (required)
212 region: string, Name of the region for this request. (required)
213 router: string, Name of the Router resource to delete. (required)
214
215Returns:
216 An object of the form:
217
218 { # An Operation resource, used to manage asynchronous API requests.
219 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
220 "clientOperationId": "A String", # [Output Only] Reserved for future use.
221 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
222 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
223 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
224 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
225 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
226 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
227 "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.
228 "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.
229 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
230 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
231 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
232 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
233 {
234 "message": "A String", # [Output Only] A human-readable description of the warning code.
235 "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.
236 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
237 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
238 {
239 "value": "A String", # [Output Only] A warning data value corresponding to the key.
240 "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).
241 },
242 ],
243 },
244 ],
245 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
246 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
247 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
248 "name": "A String", # [Output Only] Name of the resource.
249 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
250 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
251 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
252 {
253 "message": "A String", # [Output Only] An optional, human-readable error message.
254 "code": "A String", # [Output Only] The error type identifier for this error.
255 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
256 },
257 ],
258 },
259 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
260 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800261 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700262 }</pre>
263</div>
264
265<div class="method">
266 <code class="details" id="get">get(project, region, router)</code>
267 <pre>Returns the specified Router resource. Get a list of available routers by making a list() request.
268
269Args:
270 project: string, Project ID for this request. (required)
271 region: string, Name of the region for this request. (required)
272 router: string, Name of the Router resource to return. (required)
273
274Returns:
275 An object of the form:
276
277 { # Router resource.
278 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
279 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700280 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700281 {
282 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
283 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
284 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
285 },
286 ],
287 "bgp": { # BGP information specific to this router.
288 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
289 },
290 "network": "A String", # URI of the network to which this router belongs.
291 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
292 {
293 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
294 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
295 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
296 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
297 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
298 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
299 },
300 ],
301 "region": "A String", # [Output Only] URI of the region where the router resides.
302 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
303 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
304 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
305 "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.
306 }</pre>
307</div>
308
309<div class="method">
310 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
311 <pre>Retrieves runtime information of the specified router.
312
313Args:
314 project: string, Project ID for this request. (required)
315 region: string, Name of the region for this request. (required)
316 router: string, Name of the Router resource to query. (required)
317
318Returns:
319 An object of the form:
320
321 {
322 "kind": "compute#routerStatusResponse", # Type of resource.
323 "result": {
324 "bgpPeerStatus": [
325 {
326 "status": "A String", # Status of the BGP peer: {UP, DOWN}
327 "uptime": "A String", # Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
328 "name": "A String", # Name of this BGP peer. Unique within the Routers resource.
329 "uptimeSeconds": "A String", # Time this session has been up, in seconds. Format: 145
330 "linkedVpnTunnel": "A String", # URL of the VPN tunnel that this BGP peer controls.
331 "peerIpAddress": "A String", # IP address of the remote BGP interface.
332 "advertisedRoutes": [ # Routes that were advertised to the remote BGP peer
333 { # Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.
334 #
335 # For each packet leaving a instance, the system searches that instance'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 nextHop field of the winning route - either to another instance destination, a instance gateway or a Google Compute Engine-operated gateway.
336 #
337 # Packets that do not match any route in the sending instance's routing table are dropped.
338 "nextHopGateway": "A String", # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/<project-id>/global/gateways/default-internet-gateway
339 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
340 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
341 "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.
342 "tags": [ # A list of instance tags to which this route applies.
343 "A String",
344 ],
345 "nextHopInstance": "A String", # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
346 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
347 "priority": 42, # The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.
348 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
349 "network": "A String", # Fully-qualified URL of the network that this route applies to.
350 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
351 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
352 {
353 "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" }
357 {
358 "value": "A String", # [Output Only] A warning data value corresponding to the key.
359 "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).
360 },
361 ],
362 },
363 ],
364 "destRange": "A String", # The destination range of outgoing packets that this route applies to.
365 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
366 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
367 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets.
368 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
369 },
370 ],
371 "state": "A String", # BGP state as specified in RFC1771.
372 "ipAddress": "A String", # IP address of the local BGP interface.
373 "numLearnedRoutes": 42, # Number of routes learned from the remote BGP Peer.
374 },
375 ],
376 "network": "A String", # URI of the network to which this router belongs.
377 "bestRoutes": [ # Best routes for this router's network.
378 { # Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.
379 #
380 # For each packet leaving a instance, the system searches that instance'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 nextHop field of the winning route - either to another instance destination, a instance gateway or a Google Compute Engine-operated gateway.
381 #
382 # Packets that do not match any route in the sending instance's routing table are dropped.
383 "nextHopGateway": "A String", # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/<project-id>/global/gateways/default-internet-gateway
384 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
385 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
386 "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.
387 "tags": [ # A list of instance tags to which this route applies.
388 "A String",
389 ],
390 "nextHopInstance": "A String", # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
391 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
392 "priority": 42, # The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.
393 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
394 "network": "A String", # Fully-qualified URL of the network that this route applies to.
395 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
396 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
397 {
398 "message": "A String", # [Output Only] A human-readable description of the warning code.
399 "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.
400 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
401 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
402 {
403 "value": "A String", # [Output Only] A warning data value corresponding to the key.
404 "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).
405 },
406 ],
407 },
408 ],
409 "destRange": "A String", # The destination range of outgoing packets that this route applies to.
410 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
411 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
412 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets.
413 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
414 },
415 ],
416 },
417 }</pre>
418</div>
419
420<div class="method">
421 <code class="details" id="insert">insert(project, region, body)</code>
422 <pre>Creates a Router resource in the specified project and region using the data included in the request.
423
424Args:
425 project: string, Project ID for this request. (required)
426 region: string, Name of the region for this request. (required)
427 body: object, The request body. (required)
428 The object takes the form of:
429
430{ # Router resource.
431 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
432 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700433 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700434 {
435 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
436 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
437 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
438 },
439 ],
440 "bgp": { # BGP information specific to this router.
441 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
442 },
443 "network": "A String", # URI of the network to which this router belongs.
444 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
445 {
446 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
447 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
448 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
449 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
450 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
451 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
452 },
453 ],
454 "region": "A String", # [Output Only] URI of the region where the router resides.
455 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
456 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
457 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
458 "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.
459 }
460
461
462Returns:
463 An object of the form:
464
465 { # An Operation resource, used to manage asynchronous API requests.
466 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
467 "clientOperationId": "A String", # [Output Only] Reserved for future use.
468 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
469 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
470 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
471 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
472 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
473 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
474 "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.
475 "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.
476 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
477 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
478 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
479 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
480 {
481 "message": "A String", # [Output Only] A human-readable description of the warning code.
482 "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.
483 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
484 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
485 {
486 "value": "A String", # [Output Only] A warning data value corresponding to the key.
487 "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).
488 },
489 ],
490 },
491 ],
492 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
493 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
494 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
495 "name": "A String", # [Output Only] Name of the resource.
496 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
497 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
498 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
499 {
500 "message": "A String", # [Output Only] An optional, human-readable error message.
501 "code": "A String", # [Output Only] The error type identifier for this error.
502 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
503 },
504 ],
505 },
506 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
507 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800508 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700509 }</pre>
510</div>
511
512<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700513 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700514 <pre>Retrieves a list of Router resources available to the specified project.
515
516Args:
517 project: string, Project ID for this request. (required)
518 region: string, Name of the region for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700519 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
520
521You 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.
522
523Currently, only sorting by name or creationTimestamp desc is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700524 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.
525 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.
526 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
527
528The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
529
530For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
531
532You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
533
534To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
535
536Returns:
537 An object of the form:
538
539 { # Contains a list of Router resources.
540 "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.
541 "items": [ # A list of Router resources.
542 { # Router resource.
543 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
544 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700545 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700546 {
547 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
548 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
549 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
550 },
551 ],
552 "bgp": { # BGP information specific to this router.
553 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
554 },
555 "network": "A String", # URI of the network to which this router belongs.
556 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
557 {
558 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
559 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
560 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
561 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
562 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
563 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
564 },
565 ],
566 "region": "A String", # [Output Only] URI of the region where the router resides.
567 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
568 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
569 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
570 "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.
571 },
572 ],
573 "kind": "compute#routerList", # [Output Only] Type of resource. Always compute#router for routers.
574 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700575 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700576 }</pre>
577</div>
578
579<div class="method">
580 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
581 <pre>Retrieves the next page of results.
582
583Args:
584 previous_request: The request for the previous page. (required)
585 previous_response: The response from the request for the previous page. (required)
586
587Returns:
588 A request object that you can call 'execute()' on to request the next
589 page. Returns None if there are no more items in the collection.
590 </pre>
591</div>
592
593<div class="method">
594 <code class="details" id="patch">patch(project, region, router, body)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700595 <pre>Updates the specified Router resource with the data included in the request. This method supports patch semantics.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700596
597Args:
598 project: string, Project ID for this request. (required)
599 region: string, Name of the region for this request. (required)
600 router: string, Name of the Router resource to update. (required)
601 body: object, The request body. (required)
602 The object takes the form of:
603
604{ # Router resource.
605 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
606 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700607 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700608 {
609 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
610 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
611 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
612 },
613 ],
614 "bgp": { # BGP information specific to this router.
615 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
616 },
617 "network": "A String", # URI of the network to which this router belongs.
618 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
619 {
620 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
621 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
622 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
623 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
624 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
625 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
626 },
627 ],
628 "region": "A String", # [Output Only] URI of the region where the router resides.
629 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
630 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
631 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
632 "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.
633 }
634
635
636Returns:
637 An object of the form:
638
639 { # An Operation resource, used to manage asynchronous API requests.
640 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
641 "clientOperationId": "A String", # [Output Only] Reserved for future use.
642 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
643 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
644 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
645 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
646 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
647 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
648 "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.
649 "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.
650 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
651 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
652 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
653 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
654 {
655 "message": "A String", # [Output Only] A human-readable description of the warning code.
656 "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.
657 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
658 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
659 {
660 "value": "A String", # [Output Only] A warning data value corresponding to the key.
661 "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).
662 },
663 ],
664 },
665 ],
666 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
667 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
668 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
669 "name": "A String", # [Output Only] Name of the resource.
670 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
671 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
672 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
673 {
674 "message": "A String", # [Output Only] An optional, human-readable error message.
675 "code": "A String", # [Output Only] The error type identifier for this error.
676 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
677 },
678 ],
679 },
680 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
681 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800682 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700683 }</pre>
684</div>
685
686<div class="method">
687 <code class="details" id="preview">preview(project, region, router, body)</code>
688 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
689
690Args:
691 project: string, Project ID for this request. (required)
692 region: string, Name of the region for this request. (required)
693 router: string, Name of the Router resource to query. (required)
694 body: object, The request body. (required)
695 The object takes the form of:
696
697{ # Router resource.
698 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
699 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700700 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700701 {
702 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
703 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
704 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
705 },
706 ],
707 "bgp": { # BGP information specific to this router.
708 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
709 },
710 "network": "A String", # URI of the network to which this router belongs.
711 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
712 {
713 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
714 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
715 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
716 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
717 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
718 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
719 },
720 ],
721 "region": "A String", # [Output Only] URI of the region where the router resides.
722 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
723 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
724 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
725 "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.
726 }
727
728
729Returns:
730 An object of the form:
731
732 {
733 "resource": { # Router resource. # Preview of given router.
734 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
735 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700736 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700737 {
738 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
739 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
740 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
741 },
742 ],
743 "bgp": { # BGP information specific to this router.
744 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
745 },
746 "network": "A String", # URI of the network to which this router belongs.
747 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
748 {
749 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
750 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
751 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
752 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
753 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
754 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
755 },
756 ],
757 "region": "A String", # [Output Only] URI of the region where the router resides.
758 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
759 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
760 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
761 "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.
762 },
763 }</pre>
764</div>
765
766<div class="method">
767 <code class="details" id="update">update(project, region, router, body)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700768 <pre>Updates the specified Router resource with the data included in the request.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700769
770Args:
771 project: string, Project ID for this request. (required)
772 region: string, Name of the region for this request. (required)
773 router: string, Name of the Router resource to update. (required)
774 body: object, The request body. (required)
775 The object takes the form of:
776
777{ # Router resource.
778 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
779 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700780 "interfaces": [ # Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700781 {
782 "linkedVpnTunnel": "A String", # URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource.
783 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
784 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
785 },
786 ],
787 "bgp": { # BGP information specific to this router.
788 "asn": 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
789 },
790 "network": "A String", # URI of the network to which this router belongs.
791 "bgpPeers": [ # BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.
792 {
793 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
794 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud.
795 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.
796 "advertisedRoutePriority": 42, # The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.
797 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform.
798 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
799 },
800 ],
801 "region": "A String", # [Output Only] URI of the region where the router resides.
802 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
803 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
804 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
805 "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.
806 }
807
808
809Returns:
810 An object of the form:
811
812 { # An Operation resource, used to manage asynchronous API requests.
813 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
814 "clientOperationId": "A String", # [Output Only] Reserved for future use.
815 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
816 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
817 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
818 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
819 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
820 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
821 "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.
822 "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.
823 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
824 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
825 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
826 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
827 {
828 "message": "A String", # [Output Only] A human-readable description of the warning code.
829 "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.
830 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
831 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
832 {
833 "value": "A String", # [Output Only] A warning data value corresponding to the key.
834 "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).
835 },
836 ],
837 },
838 ],
839 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
840 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
841 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
842 "name": "A String", # [Output Only] Name of the resource.
843 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
844 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
845 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
846 {
847 "message": "A String", # [Output Only] An optional, human-readable error message.
848 "code": "A String", # [Output Only] The error type identifier for this error.
849 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
850 },
851 ],
852 },
853 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
854 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800855 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700856 }</pre>
857</div>
858
859</body></html>