1<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"> 78 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 79<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"> 96 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 97<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> 103<p class="firstline">Patches the specified Router resource with the data included in the request. This method supports patch semantics.</p> 104<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> 109<p class="firstline">Updates the specified Router resource with the data included in the request.</p> 110<h3>Method Details</h3> 111<div class="method"> 112 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 113 <pre>Retrieves an aggregated list of routers. 114 115Args: 116 project: string, Project ID for this request. (required) 117 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 118 119You can also sort results in descending order based on the creation timestamp using orderBy="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. 122 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) 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. 145 "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. 146 { 147 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 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. Only IPv4 is supported. 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. Only IPv4 is supported. 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", # [Deprecated] This field is deprecated. 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. 261 "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. 262 }</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. 280 "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. 281 { 282 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 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. Only IPv4 is supported. 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. Only IPv4 is supported. 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, an 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. Only IPv4 is supported. 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. Only IPv4 is supported. 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 "bestRoutesForRouter": [ # Best routes learned by this router. 377 { # 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. 378 # 379 # 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, an instance gateway, or a Google Compute Engine-operated gateway. 380 # 381 # Packets that do not match any route in the sending instance's routing table are dropped. 382 "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 383 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets. 384 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources. 385 "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. 386 "tags": [ # A list of instance tags to which this route applies. 387 "A String", 388 ], 389 "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: 390 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ 391 "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. 392 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets. 393 "network": "A String", # Fully-qualified URL of the network that this route applies to. 394 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 395 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. 396 { 397 "message": "A String", # [Output Only] A human-readable description of the warning code. 398 "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. 399 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 400 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 401 { 402 "value": "A String", # [Output Only] A warning data value corresponding to the key. 403 "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). 404 }, 405 ], 406 }, 407 ], 408 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported. 409 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 410 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 411 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported. 412 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 413 }, 414 ], 415 "network": "A String", # URI of the network to which this router belongs. 416 "bestRoutes": [ # Best routes for this router's network. 417 { # 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. 418 # 419 # 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, an instance gateway, or a Google Compute Engine-operated gateway. 420 # 421 # Packets that do not match any route in the sending instance's routing table are dropped. 422 "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 423 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets. 424 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources. 425 "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. 426 "tags": [ # A list of instance tags to which this route applies. 427 "A String", 428 ], 429 "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: 430 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ 431 "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. 432 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets. 433 "network": "A String", # Fully-qualified URL of the network that this route applies to. 434 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 435 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. 436 { 437 "message": "A String", # [Output Only] A human-readable description of the warning code. 438 "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. 439 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 440 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 441 { 442 "value": "A String", # [Output Only] A warning data value corresponding to the key. 443 "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). 444 }, 445 ], 446 }, 447 ], 448 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported. 449 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 450 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 451 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported. 452 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 453 }, 454 ], 455 }, 456 }</pre> 457</div> 458 459<div class="method"> 460 <code class="details" id="insert">insert(project, region, body)</code> 461 <pre>Creates a Router resource in the specified project and region using the data included in the request. 462 463Args: 464 project: string, Project ID for this request. (required) 465 region: string, Name of the region for this request. (required) 466 body: object, The request body. (required) 467 The object takes the form of: 468 469{ # Router resource. 470 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers. 471 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 472 "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. 473 { 474 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 475 "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. 476 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035. 477 }, 478 ], 479 "bgp": { # BGP information specific to this router. 480 "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. 481 }, 482 "network": "A String", # URI of the network to which this router belongs. 483 "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. 484 { 485 "interfaceName": "A String", # Name of the interface the BGP peer is associated with. 486 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud. Only IPv4 is supported. 487 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel. 488 "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. 489 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. 490 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035. 491 }, 492 ], 493 "region": "A String", # [Output Only] URI of the region where the router resides. 494 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 495 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 496 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 497 "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. 498 } 499 500 501Returns: 502 An object of the form: 503 504 { # An Operation resource, used to manage asynchronous API requests. 505 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 506 "clientOperationId": "A String", # [Output Only] Reserved for future use. 507 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 508 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 509 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 510 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 511 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 512 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 513 "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. 514 "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. 515 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 516 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 517 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 518 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 519 { 520 "message": "A String", # [Output Only] A human-readable description of the warning code. 521 "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. 522 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 523 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 524 { 525 "value": "A String", # [Output Only] A warning data value corresponding to the key. 526 "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). 527 }, 528 ], 529 }, 530 ], 531 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 532 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 533 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 534 "name": "A String", # [Output Only] Name of the resource. 535 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 536 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 537 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 538 { 539 "message": "A String", # [Output Only] An optional, human-readable error message. 540 "code": "A String", # [Output Only] The error type identifier for this error. 541 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 542 }, 543 ], 544 }, 545 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 546 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 547 "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. 548 }</pre> 549</div> 550 551<div class="method"> 552 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 553 <pre>Retrieves a list of Router resources available to the specified project. 554 555Args: 556 project: string, Project ID for this request. (required) 557 region: string, Name of the region for this request. (required) 558 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 559 560You 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. 561 562Currently, only sorting by name or creationTimestamp desc is supported. 563 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) 564 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. 565 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. 566 567The 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. 568 569For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 570 571You 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. 572 573To 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. 574 575Returns: 576 An object of the form: 577 578 { # Contains a list of Router resources. 579 "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. 580 "items": [ # A list of Router resources. 581 { # Router resource. 582 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers. 583 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 584 "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. 585 { 586 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 587 "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. 588 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035. 589 }, 590 ], 591 "bgp": { # BGP information specific to this router. 592 "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. 593 }, 594 "network": "A String", # URI of the network to which this router belongs. 595 "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. 596 { 597 "interfaceName": "A String", # Name of the interface the BGP peer is associated with. 598 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud. Only IPv4 is supported. 599 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel. 600 "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. 601 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. 602 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035. 603 }, 604 ], 605 "region": "A String", # [Output Only] URI of the region where the router resides. 606 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 607 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 608 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 609 "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. 610 }, 611 ], 612 "kind": "compute#routerList", # [Output Only] Type of resource. Always compute#router for routers. 613 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 614 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 615 }</pre> 616</div> 617 618<div class="method"> 619 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 620 <pre>Retrieves the next page of results. 621 622Args: 623 previous_request: The request for the previous page. (required) 624 previous_response: The response from the request for the previous page. (required) 625 626Returns: 627 A request object that you can call 'execute()' on to request the next 628 page. Returns None if there are no more items in the collection. 629 </pre> 630</div> 631 632<div class="method"> 633 <code class="details" id="patch">patch(project, region, router, body)</code> 634 <pre>Patches the specified Router resource with the data included in the request. This method supports patch semantics. 635 636Args: 637 project: string, Project ID for this request. (required) 638 region: string, Name of the region for this request. (required) 639 router: string, Name of the Router resource to patch. (required) 640 body: object, The request body. (required) 641 The object takes the form of: 642 643{ # Router resource. 644 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers. 645 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 646 "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. 647 { 648 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 649 "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. 650 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035. 651 }, 652 ], 653 "bgp": { # BGP information specific to this router. 654 "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. 655 }, 656 "network": "A String", # URI of the network to which this router belongs. 657 "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. 658 { 659 "interfaceName": "A String", # Name of the interface the BGP peer is associated with. 660 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud. Only IPv4 is supported. 661 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel. 662 "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. 663 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. 664 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035. 665 }, 666 ], 667 "region": "A String", # [Output Only] URI of the region where the router resides. 668 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 669 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 670 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 671 "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. 672 } 673 674 675Returns: 676 An object of the form: 677 678 { # An Operation resource, used to manage asynchronous API requests. 679 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 680 "clientOperationId": "A String", # [Output Only] Reserved for future use. 681 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 682 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 683 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 684 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 685 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 686 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 687 "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. 688 "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. 689 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 690 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 691 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 692 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 693 { 694 "message": "A String", # [Output Only] A human-readable description of the warning code. 695 "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. 696 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 697 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 698 { 699 "value": "A String", # [Output Only] A warning data value corresponding to the key. 700 "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). 701 }, 702 ], 703 }, 704 ], 705 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 706 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 707 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 708 "name": "A String", # [Output Only] Name of the resource. 709 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 710 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 711 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 712 { 713 "message": "A String", # [Output Only] An optional, human-readable error message. 714 "code": "A String", # [Output Only] The error type identifier for this error. 715 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 716 }, 717 ], 718 }, 719 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 720 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 721 "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. 722 }</pre> 723</div> 724 725<div class="method"> 726 <code class="details" id="preview">preview(project, region, router, body)</code> 727 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. 728 729Args: 730 project: string, Project ID for this request. (required) 731 region: string, Name of the region for this request. (required) 732 router: string, Name of the Router resource to query. (required) 733 body: object, The request body. (required) 734 The object takes the form of: 735 736{ # Router resource. 737 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers. 738 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 739 "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. 740 { 741 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 742 "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. 743 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035. 744 }, 745 ], 746 "bgp": { # BGP information specific to this router. 747 "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. 748 }, 749 "network": "A String", # URI of the network to which this router belongs. 750 "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. 751 { 752 "interfaceName": "A String", # Name of the interface the BGP peer is associated with. 753 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud. Only IPv4 is supported. 754 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel. 755 "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. 756 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. 757 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035. 758 }, 759 ], 760 "region": "A String", # [Output Only] URI of the region where the router resides. 761 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 762 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 763 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 764 "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. 765 } 766 767 768Returns: 769 An object of the form: 770 771 { 772 "resource": { # Router resource. # Preview of given router. 773 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers. 774 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 775 "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. 776 { 777 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 778 "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. 779 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035. 780 }, 781 ], 782 "bgp": { # BGP information specific to this router. 783 "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. 784 }, 785 "network": "A String", # URI of the network to which this router belongs. 786 "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. 787 { 788 "interfaceName": "A String", # Name of the interface the BGP peer is associated with. 789 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud. Only IPv4 is supported. 790 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel. 791 "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. 792 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. 793 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035. 794 }, 795 ], 796 "region": "A String", # [Output Only] URI of the region where the router resides. 797 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 798 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 799 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 800 "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. 801 }, 802 }</pre> 803</div> 804 805<div class="method"> 806 <code class="details" id="update">update(project, region, router, body)</code> 807 <pre>Updates the specified Router resource with the data included in the request. 808 809Args: 810 project: string, Project ID for this request. (required) 811 region: string, Name of the region for this request. (required) 812 router: string, Name of the Router resource to update. (required) 813 body: object, The request body. (required) 814 The object takes the form of: 815 816{ # Router resource. 817 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers. 818 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 819 "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. 820 { 821 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment. 822 "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. 823 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035. 824 }, 825 ], 826 "bgp": { # BGP information specific to this router. 827 "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. 828 }, 829 "network": "A String", # URI of the network to which this router belongs. 830 "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. 831 { 832 "interfaceName": "A String", # Name of the interface the BGP peer is associated with. 833 "peerIpAddress": "A String", # IP address of the BGP interface outside Google cloud. Only IPv4 is supported. 834 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel. 835 "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. 836 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. 837 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035. 838 }, 839 ], 840 "region": "A String", # [Output Only] URI of the region where the router resides. 841 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 842 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 843 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 844 "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. 845 } 846 847 848Returns: 849 An object of the form: 850 851 { # An Operation resource, used to manage asynchronous API requests. 852 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 853 "clientOperationId": "A String", # [Output Only] Reserved for future use. 854 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 855 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 856 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 857 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 858 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 859 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 860 "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. 861 "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. 862 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 863 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 864 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 865 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 866 { 867 "message": "A String", # [Output Only] A human-readable description of the warning code. 868 "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. 869 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 870 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 871 { 872 "value": "A String", # [Output Only] A warning data value corresponding to the key. 873 "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). 874 }, 875 ], 876 }, 877 ], 878 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 879 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 880 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 881 "name": "A String", # [Output Only] Name of the resource. 882 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 883 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 884 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 885 { 886 "message": "A String", # [Output Only] An optional, human-readable error message. 887 "code": "A String", # [Output Only] The error type identifier for this error. 888 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 889 }, 890 ], 891 }, 892 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 893 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 894 "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. 895 }</pre> 896</div> 897 898</body></html>