Method: routers.getRouterStatus

Retrieves runtime information of the specified router.

HTTP request

GET https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{resourceId}/getRouterStatus

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region for this request.

resourceId

string

Name of the Router resource to query.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "result": {
    "network": string,
    "bestRoutes": {
      "id": string,
      "creationTimestamp": string,
      "name": string,
      "description": string,
      "network": string,
      "tags": [
        string
      ],
      "destRange": string,
      "priority": number,
      "nextHopInstance": string,
      "nextHopIp": string,
      "nextHopNetwork": string,
      "nextHopGateway": string,
      "nextHopPeering": string,
      "warnings": [
        {
          "code": enum,
          "message": string,
          "data": {
            "key": string,
            "value": string
          }
        }
      ],
      "nextHopVpnTunnel": string,
      "selfLink": string,
      "kind": string
    },
    "bestRoutesForRouter": {
      "id": string,
      "creationTimestamp": string,
      "name": string,
      "description": string,
      "network": string,
      "tags": [
        string
      ],
      "destRange": string,
      "priority": number,
      "nextHopInstance": string,
      "nextHopIp": string,
      "nextHopNetwork": string,
      "nextHopGateway": string,
      "nextHopPeering": string,
      "warnings": [
        {
          "code": enum,
          "message": string,
          "data": {
            "key": string,
            "value": string
          }
        }
      ],
      "nextHopVpnTunnel": string,
      "selfLink": string,
      "kind": string
    },
    "bgpPeerStatus": {
      "name": string,
      "linkedVpnTunnel": string,
      "ipAddress": string,
      "peerIpAddress": string,
      "status": enum,
      "state": string,
      "uptime": string,
      "uptimeSeconds": string,
      "numLearnedRoutes": number,
      "advertisedRoutes": [
        {
          "id": string,
          "creationTimestamp": string,
          "name": string,
          "description": string,
          "network": string,
          "tags": string,
          "destRange": string,
          "priority": number,
          "nextHopInstance": string,
          "nextHopIp": string,
          "nextHopNetwork": string,
          "nextHopGateway": string,
          "nextHopPeering": string,
          "warnings": {
            "code": enum,
            "message": string,
            "data": [
              {
                "key": string,
                "value": string
              }
            ]
          },
          "nextHopVpnTunnel": string,
          "selfLink": string,
          "kind": string
        }
      ]
    }
  },
  "kind": string,
}
Fields
result

object

result.network

string

URI of the network to which this router belongs.

result.bestRoutes[]

object

Best routes for this router's network.

result.bestRoutes[].id

string (fixed64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

result.bestRoutes[].creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

result.bestRoutes[].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.

result.bestRoutes[].description

string

An optional description of this resource. Provide this property when you create the resource.

result.bestRoutes[].network

string

Fully-qualified URL of the network that this route applies to.

result.bestRoutes[].tags[]

string

A list of instance tags to which this route applies.

result.bestRoutes[].destRange

string

The destination range of outgoing packets that this route applies to. Only IPv4 is supported.

result.bestRoutes[].priority

number (uint32 format)

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.

result.bestRoutes[].nextHopInstance

string

The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/

result.bestRoutes[].nextHopIp

string

The network IP address of an instance that should handle matching packets. Only IPv4 is supported.

result.bestRoutes[].nextHopNetwork

string

The URL of the local network if it should handle matching packets.

result.bestRoutes[].nextHopGateway

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

result.bestRoutes[].nextHopPeering

string

[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.

result.bestRoutes[].warnings[]

object

[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.

result.bestRoutes[].warnings[].code

enum

[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.

result.bestRoutes[].warnings[].message

string

[Output Only] A human-readable description of the warning code.

result.bestRoutes[].warnings[].data[]

object

[Output Only] Metadata about this warning in key: value format. For example:

"data": [  {  "key": "scope",  "value": "zones/us-east1-d"  }

result.bestRoutes[].warnings[].data[].key

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).

result.bestRoutes[].warnings[].data[].value

string

[Output Only] A warning data value corresponding to the key.

result.bestRoutes[].nextHopVpnTunnel

string

The URL to a VpnTunnel that should handle matching packets.

result.bestRoutes[].selfLink

string

[Output Only] Server-defined fully-qualified URL for this resource.

result.bestRoutes[].kind

string

[Output Only] Type of this resource. Always compute#routes for Route resources.

result.bestRoutesForRouter[]

object

Best routes learned by this router.

result.bestRoutesForRouter[].id

string (fixed64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

result.bestRoutesForRouter[].creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

result.bestRoutesForRouter[].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.

result.bestRoutesForRouter[].description

string

An optional description of this resource. Provide this property when you create the resource.

result.bestRoutesForRouter[].network

string

Fully-qualified URL of the network that this route applies to.

result.bestRoutesForRouter[].tags[]

string

A list of instance tags to which this route applies.

result.bestRoutesForRouter[].destRange

string

The destination range of outgoing packets that this route applies to. Only IPv4 is supported.

result.bestRoutesForRouter[].priority

number (uint32 format)

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.

result.bestRoutesForRouter[].nextHopInstance

string

The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/

result.bestRoutesForRouter[].nextHopIp

string

The network IP address of an instance that should handle matching packets. Only IPv4 is supported.

result.bestRoutesForRouter[].nextHopNetwork

string

The URL of the local network if it should handle matching packets.

result.bestRoutesForRouter[].nextHopGateway

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

result.bestRoutesForRouter[].nextHopPeering

string

[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.

result.bestRoutesForRouter[].warnings[]

object

[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.

result.bestRoutesForRouter[].warnings[].code

enum

[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.

result.bestRoutesForRouter[].warnings[].message

string

[Output Only] A human-readable description of the warning code.

result.bestRoutesForRouter[].warnings[].data[]

object

[Output Only] Metadata about this warning in key: value format. For example:

"data": [  {  "key": "scope",  "value": "zones/us-east1-d"  }

result.bestRoutesForRouter[].warnings[].data[].key

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).

result.bestRoutesForRouter[].warnings[].data[].value

string

[Output Only] A warning data value corresponding to the key.

result.bestRoutesForRouter[].nextHopVpnTunnel

string

The URL to a VpnTunnel that should handle matching packets.

result.bestRoutesForRouter[].selfLink

string

[Output Only] Server-defined fully-qualified URL for this resource.

result.bestRoutesForRouter[].kind

string

[Output Only] Type of this resource. Always compute#routes for Route resources.

result.bgpPeerStatus[]

object

result.bgpPeerStatus[].name

string

Name of this BGP peer. Unique within the Routers resource.

result.bgpPeerStatus[].linkedVpnTunnel

string

URL of the VPN tunnel that this BGP peer controls.

result.bgpPeerStatus[].ipAddress

string

IP address of the local BGP interface.

result.bgpPeerStatus[].peerIpAddress

string

IP address of the remote BGP interface.

result.bgpPeerStatus[].status

enum

Status of the BGP peer: {UP, DOWN}

result.bgpPeerStatus[].state

string

BGP state as specified in RFC1771.

result.bgpPeerStatus[].uptime

string

Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds

result.bgpPeerStatus[].uptimeSeconds

string

Time this session has been up, in seconds. Format: 145

result.bgpPeerStatus[].numLearnedRoutes

number (uint32 format)

Number of routes learned from the remote BGP Peer.

result.bgpPeerStatus[].advertisedRoutes[]

object

Routes that were advertised to the remote BGP peer

result.bgpPeerStatus[].advertisedRoutes[].id

string (fixed64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

result.bgpPeerStatus[].advertisedRoutes[].creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

result.bgpPeerStatus[].advertisedRoutes[].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.

result.bgpPeerStatus[].advertisedRoutes[].description

string

An optional description of this resource. Provide this property when you create the resource.

result.bgpPeerStatus[].advertisedRoutes[].network

string

Fully-qualified URL of the network that this route applies to.

result.bgpPeerStatus[].advertisedRoutes[].tags[]

string

A list of instance tags to which this route applies.

result.bgpPeerStatus[].advertisedRoutes[].destRange

string

The destination range of outgoing packets that this route applies to. Only IPv4 is supported.

result.bgpPeerStatus[].advertisedRoutes[].priority

number (uint32 format)

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.

result.bgpPeerStatus[].advertisedRoutes[].nextHopInstance

string

The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/

result.bgpPeerStatus[].advertisedRoutes[].nextHopIp

string

The network IP address of an instance that should handle matching packets. Only IPv4 is supported.

result.bgpPeerStatus[].advertisedRoutes[].nextHopNetwork

string

The URL of the local network if it should handle matching packets.

result.bgpPeerStatus[].advertisedRoutes[].nextHopGateway

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

result.bgpPeerStatus[].advertisedRoutes[].nextHopPeering

string

[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.

result.bgpPeerStatus[].advertisedRoutes[].warnings[]

object

[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.

result.bgpPeerStatus[].advertisedRoutes[].warnings[].code

enum

[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.

result.bgpPeerStatus[].advertisedRoutes[].warnings[].message

string

[Output Only] A human-readable description of the warning code.

result.bgpPeerStatus[].advertisedRoutes[].warnings[].data[]

object

[Output Only] Metadata about this warning in key: value format. For example:

"data": [  {  "key": "scope",  "value": "zones/us-east1-d"  }

result.bgpPeerStatus[].advertisedRoutes[].warnings[].data[].key

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).

result.bgpPeerStatus[].advertisedRoutes[].warnings[].data[].value

string

[Output Only] A warning data value corresponding to the key.

result.bgpPeerStatus[].advertisedRoutes[].nextHopVpnTunnel

string

The URL to a VpnTunnel that should handle matching packets.

result.bgpPeerStatus[].advertisedRoutes[].selfLink

string

[Output Only] Server-defined fully-qualified URL for this resource.

result.bgpPeerStatus[].advertisedRoutes[].kind

string

[Output Only] Type of this resource. Always compute#routes for Route resources.