Represents a Route resource.
A route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with VMs by tag, and the set of routes for a particular VM is called its routing table. For each packet leaving a VM, the system searches that VM's routing table for a single best matching route.
Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the
next_hop
field of the winning route -- either to another VM destination, a VM gateway or a GCE operated gateway. Packets that do not match any route in the sending VM's routing table will be dropped.
For more information, review the
routes
documentation.
For a list of methods for this resource, see the end of this page.
Resource representations
A Route resource.
{ "kind": "compute#route", "selfLink": string, "id": unsigned long, "creationTimestamp": string, "name": string, "description": string, "network": string, "tags": [ string ], "destRange": string, "priority": unsigned integer, "nextHopInstance": string, "nextHopIp": string, "nextHopNetwork": string, "nextHopGateway": string, "warnings": [ { "code": string, "message": string, "data": [ { "key": string, "value": string } ] } ] }
Property name | Value | Description | Notes |
---|---|---|---|
creationTimestamp
|
string
|
Output Only] Creation timestamp i n RFC3339 format . | |
description
|
string
|
An optional textual description of the resource; provided by the client when the resource is created. | |
destRange
|
string
|
The destination range of outgoing packets that this route applies to. | |
id
|
unsigned long
|
[Output Only] Unique identifier for the resource. This is generated by the server. | |
kind
|
string
|
[Output Only]
The type of resource. Always
compute#route
for Routes resources.
|
|
name
|
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. |
|
network
|
string
|
Fully-qualified URL of the network that this route applies to. | |
nextHopGateway
|
string
|
The URL to a gateway that should handle matching packets. Currently, this is only the internet gateway:
projects/<project-id>/global/gateways/default-internet-gateway |
|
nextHopInstance
|
string
|
The fully-qualified URL to an instance that should handle matching packets. For example:
https://www.googleapis.com/compute/v1/projects/<project-id>/zones/<zone-name>/instances/<instance-name> |
|
nextHopIp
|
string
|
The network IP address of an instance that should handle matching packets. | |
nextHopNetwork
|
string
|
[Output Only] The URL of the local network if it should handle matching packets. | |
priority
|
unsigned integer
|
T
he priority of this route. Priority is used to break ties in the case where there is more than one matching route of maximum length. A lower value is higher priority; a priority of
100
is higher than
200
.
|
|
selfLink
|
string
|
[Output Only] Server-defined fully-qualified URL for this resource. | |
tags[]
|
list
|
A list of instance tags to which this route applies. | |
warnings[]
|
list
|
If potential misconfigurations are detected for this route, this field will be populated with warning messages. | |
warnings[].
code
|
string
|
The warning type identifier for this warning.
Acceptable values are:
|
|
warnings[].
data[]
|
list
|
Metadata for this warning in 'key: value' format. | |
warnings[].data[].
key
|
string
|
[Output Only] Metadata key for this warning. | |
warnings[].data[].
value
|
string
|
[Output Only] Metadata value for this warning. | |
warnings[].
message
|
string
|
Optional human-readable details for this warning. |
Methods
The following are valid Route resource methods: