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 gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
region |
Name of the region for this request. |
resourceId |
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, "nextHopIlb": 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, "nextHopIlb": 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, "nextHopIlb": string, "warnings": [ { "code": enum, "message": string, "data": [ { "key": string, "value": string } ] } ], "nextHopVpnTunnel": string, "selfLink": string, "kind": string } ] } ], "natStatus": [ { "name": string, "userAllocatedNatIpResources": [ string ], "drainUserAllocatedNatIps": [ string ], "userAllocatedNatIps": [ string ], "autoAllocatedNatIps": [ string ], "drainAutoAllocatedNatIps": [ string ], "minExtraNatIpsNeeded": number, "numVmEndpointsWithNatMappings": number } ] }, "kind": string } |
Fields | |
---|---|
result |
|
result.network |
URI of the network to which this router belongs. |
result.bestRoutes[] |
Best routes for this router's network. |
result.bestRoutes[].id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
result.bestRoutes[].creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
result.bestRoutes[].name |
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 |
result.bestRoutes[].description |
An optional description of this resource. Provide this field when you create the resource. |
result.bestRoutes[].network |
Fully-qualified URL of the network that this route applies to. |
result.bestRoutes[].tags[] |
A list of instance tags to which this route applies. |
result.bestRoutes[].destRange |
The destination range of outgoing packets that this route applies to. Only IPv4 is supported. |
result.bestRoutes[].priority |
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 cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is |
result.bestRoutes[].nextHopInstance |
The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: |
result.bestRoutes[].nextHopIp |
The network IP address of an instance that should handle matching packets. Only IPv4 is supported. |
result.bestRoutes[].nextHopNetwork |
The URL of the local network if it should handle matching packets. |
result.bestRoutes[].nextHopGateway |
The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: |
result.bestRoutes[].nextHopPeering |
[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. |
result.bestRoutes[].nextHopIlb |
The URL to a forwarding rule of type
|
result.bestRoutes[].warnings[] |
[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
result.bestRoutes[].warnings[].code |
[Output Only] A warning code, if applicable. For example, Compute Engine returns |
result.bestRoutes[].warnings[].message |
[Output Only] A human-readable description of the warning code. |
result.bestRoutes[].warnings[].data[] |
[Output Only] Metadata about this warning in "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
result.bestRoutes[].warnings[].data[].key |
[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 |
result.bestRoutes[].warnings[].data[].value |
[Output Only] A warning data value corresponding to the key. |
result.bestRoutes[].nextHopVpnTunnel |
The URL to a VpnTunnel that should handle matching packets. |
result.bestRoutes[].selfLink |
[Output Only] Server-defined fully-qualified URL for this resource. |
result.bestRoutes[].kind |
[Output Only] Type of this resource. Always |
result.bestRoutesForRouter[] |
Best routes learned by this router. |
result.bestRoutesForRouter[].id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
result.bestRoutesForRouter[].creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
result.bestRoutesForRouter[].name |
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 |
result.bestRoutesForRouter[].description |
An optional description of this resource. Provide this field when you create the resource. |
result.bestRoutesForRouter[].network |
Fully-qualified URL of the network that this route applies to. |
result.bestRoutesForRouter[].tags[] |
A list of instance tags to which this route applies. |
result.bestRoutesForRouter[].destRange |
The destination range of outgoing packets that this route applies to. Only IPv4 is supported. |
result.bestRoutesForRouter[].priority |
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 cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is |
result.bestRoutesForRouter[].nextHopInstance |
The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: |
result.bestRoutesForRouter[].nextHopIp |
The network IP address of an instance that should handle matching packets. Only IPv4 is supported. |
result.bestRoutesForRouter[].nextHopNetwork |
The URL of the local network if it should handle matching packets. |
result.bestRoutesForRouter[].nextHopGateway |
The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: |
result.bestRoutesForRouter[].nextHopPeering |
[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. |
result.bestRoutesForRouter[].nextHopIlb |
The URL to a forwarding rule of type
|
result.bestRoutesForRouter[].warnings[] |
[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
result.bestRoutesForRouter[].warnings[].code |
[Output Only] A warning code, if applicable. For example, Compute Engine returns |
result.bestRoutesForRouter[].warnings[].message |
[Output Only] A human-readable description of the warning code. |
result.bestRoutesForRouter[].warnings[].data[] |
[Output Only] Metadata about this warning in "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
result.bestRoutesForRouter[].warnings[].data[].key |
[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 |
result.bestRoutesForRouter[].warnings[].data[].value |
[Output Only] A warning data value corresponding to the key. |
result.bestRoutesForRouter[].nextHopVpnTunnel |
The URL to a VpnTunnel that should handle matching packets. |
result.bestRoutesForRouter[].selfLink |
[Output Only] Server-defined fully-qualified URL for this resource. |
result.bestRoutesForRouter[].kind |
[Output Only] Type of this resource. Always |
result.bgpPeerStatus[] |
|
result.bgpPeerStatus[].name |
Name of this BGP peer. Unique within the Routers resource. |
result.bgpPeerStatus[].linkedVpnTunnel |
URL of the VPN tunnel that this BGP peer controls. |
result.bgpPeerStatus[].ipAddress |
IP address of the local BGP interface. |
result.bgpPeerStatus[].peerIpAddress |
IP address of the remote BGP interface. |
result.bgpPeerStatus[].status |
Status of the BGP peer: {UP, DOWN} |
result.bgpPeerStatus[].state |
BGP state as specified in RFC1771. |
result.bgpPeerStatus[].uptime |
Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds |
result.bgpPeerStatus[].uptimeSeconds |
Time this session has been up, in seconds. Format: 145 |
result.bgpPeerStatus[].numLearnedRoutes |
Number of routes learned from the remote BGP Peer. |
result.bgpPeerStatus[].advertisedRoutes[] |
Routes that were advertised to the remote BGP peer |
result.bgpPeerStatus[].advertisedRoutes[].id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
result.bgpPeerStatus[].advertisedRoutes[].creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
result.bgpPeerStatus[].advertisedRoutes[].name |
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 |
result.bgpPeerStatus[].advertisedRoutes[].description |
An optional description of this resource. Provide this field when you create the resource. |
result.bgpPeerStatus[].advertisedRoutes[].network |
Fully-qualified URL of the network that this route applies to. |
result.bgpPeerStatus[].advertisedRoutes[].tags[] |
A list of instance tags to which this route applies. |
result.bgpPeerStatus[].advertisedRoutes[].destRange |
The destination range of outgoing packets that this route applies to. Only IPv4 is supported. |
result.bgpPeerStatus[].advertisedRoutes[].priority |
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 cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is |
result.bgpPeerStatus[].advertisedRoutes[].nextHopInstance |
The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: |
result.bgpPeerStatus[].advertisedRoutes[].nextHopIp |
The network IP address of an instance that should handle matching packets. Only IPv4 is supported. |
result.bgpPeerStatus[].advertisedRoutes[].nextHopNetwork |
The URL of the local network if it should handle matching packets. |
result.bgpPeerStatus[].advertisedRoutes[].nextHopGateway |
The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: |
result.bgpPeerStatus[].advertisedRoutes[].nextHopPeering |
[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. |
result.bgpPeerStatus[].advertisedRoutes[].nextHopIlb |
The URL to a forwarding rule of type
|
result.bgpPeerStatus[].advertisedRoutes[].warnings[] |
[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
result.bgpPeerStatus[].advertisedRoutes[].warnings[].code |
[Output Only] A warning code, if applicable. For example, Compute Engine returns |
result.bgpPeerStatus[].advertisedRoutes[].warnings[].message |
[Output Only] A human-readable description of the warning code. |
result.bgpPeerStatus[].advertisedRoutes[].warnings[].data[] |
[Output Only] Metadata about this warning in "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
result.bgpPeerStatus[].advertisedRoutes[].warnings[].data[].key |
[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 |
result.bgpPeerStatus[].advertisedRoutes[].warnings[].data[].value |
[Output Only] A warning data value corresponding to the key. |
result.bgpPeerStatus[].advertisedRoutes[].nextHopVpnTunnel |
The URL to a VpnTunnel that should handle matching packets. |
result.bgpPeerStatus[].advertisedRoutes[].selfLink |
[Output Only] Server-defined fully-qualified URL for this resource. |
result.bgpPeerStatus[].advertisedRoutes[].kind |
[Output Only] Type of this resource. Always |
result.natStatus[] |
|
result.natStatus[].name |
Unique name of this NAT. |
result.natStatus[].userAllocatedNatIpResources[] |
A list of fully qualified URLs of reserved IP address resources. |
result.natStatus[].drainUserAllocatedNatIps[] |
A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. |
result.natStatus[].userAllocatedNatIps[] |
A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133". |
result.natStatus[].autoAllocatedNatIps[] |
A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"] |
result.natStatus[].drainAutoAllocatedNatIps[] |
A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. |
result.natStatus[].minExtraNatIpsNeeded |
The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is not used. |
result.natStatus[].numVmEndpointsWithNatMappings |
Number of VM endpoints (i.e., Nics) that can use NAT. |
kind |
Type of resource. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/compute
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
In addition to any permissions specified on the fields above, authorization requires one or more of the following Google IAM permissions:
compute.routers.get