- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Retrieves runtime information of the specified router.
HTTP request
GET https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}/getRouterStatus
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
region |
Name of the region for this request. |
router |
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 |
---|
{ "kind": string, "result": { "network": string, "bestRoutes": [ { "kind": string, "id": string, "creationTimestamp": string, "name": string, "description": string, "network": string, "tags": [ string ], "destRange": string, "priority": integer, "nextHopInstance": string, "nextHopIp": string, "nextHopNetwork": string, "nextHopGateway": string, "nextHopPeering": string, "nextHopIlb": string, "warnings": [ { "code": enum, "message": string, "data": [ { "key": string, "value": string } ] } ], "nextHopVpnTunnel": string, "nextHopHub": string, "selfLink": string, "routeType": enum, "asPaths": [ { "pathSegmentType": enum, "asLists": [ integer ] } ], "routeStatus": enum, "nextHopOrigin": enum, "nextHopMed": integer, "nextHopInterRegionCost": integer } ], "bestRoutesForRouter": [ { "kind": string, "id": string, "creationTimestamp": string, "name": string, "description": string, "network": string, "tags": [ string ], "destRange": string, "priority": integer, "nextHopInstance": string, "nextHopIp": string, "nextHopNetwork": string, "nextHopGateway": string, "nextHopPeering": string, "nextHopIlb": string, "warnings": [ { "code": enum, "message": string, "data": [ { "key": string, "value": string } ] } ], "nextHopVpnTunnel": string, "nextHopHub": string, "selfLink": string, "routeType": enum, "asPaths": [ { "pathSegmentType": enum, "asLists": [ integer ] } ], "routeStatus": enum, "nextHopOrigin": enum, "nextHopMed": integer, "nextHopInterRegionCost": integer } ], "bgpPeerStatus": [ { "name": string, "linkedVpnTunnel": string, "routerApplianceInstance": string, "ipAddress": string, "peerIpAddress": string, "ipv6NexthopAddress": string, "peerIpv6NexthopAddress": string, "enableIpv6": boolean, "status": enum, "state": string, "uptime": string, "uptimeSeconds": string, "numLearnedRoutes": integer, "advertisedRoutes": [ { "kind": string, "id": string, "creationTimestamp": string, "name": string, "description": string, "network": string, "tags": [ string ], "destRange": string, "priority": integer, "nextHopInstance": string, "nextHopIp": string, "nextHopNetwork": string, "nextHopGateway": string, "nextHopPeering": string, "nextHopIlb": string, "warnings": [ { "code": enum, "message": string, "data": [ { "key": string, "value": string } ] } ], "nextHopVpnTunnel": string, "nextHopHub": string, "selfLink": string, "routeType": enum, "asPaths": [ { "pathSegmentType": enum, "asLists": [ integer ] } ], "routeStatus": enum, "nextHopOrigin": enum, "nextHopMed": integer, "nextHopInterRegionCost": integer } ], "bfdStatus": { "uptimeMs": string, "localState": enum, "localDiagnostic": enum, "controlPacketCounts": { "numTx": integer, "numRx": integer, "numRxSuccessful": integer, "numRxRejected": integer }, "txPacket": { "version": integer, "diagnostic": enum, "state": enum, "poll": boolean, "final": boolean, "controlPlaneIndependent": boolean, "authenticationPresent": boolean, "demand": boolean, "multipoint": boolean, "multiplier": integer, "length": integer, "myDiscriminator": integer, "yourDiscriminator": integer, "minTxIntervalMs": integer, "minRxIntervalMs": integer, "minEchoRxIntervalMs": integer }, "rxPacket": { "version": integer, "diagnostic": enum, "state": enum, "poll": boolean, "final": boolean, "controlPlaneIndependent": boolean, "authenticationPresent": boolean, "demand": boolean, "multipoint": boolean, "multiplier": integer, "length": integer, "myDiscriminator": integer, "yourDiscriminator": integer, "minTxIntervalMs": integer, "minRxIntervalMs": integer, "minEchoRxIntervalMs": integer }, "controlPacketIntervals": [ { "type": enum, "duration": enum, "numIntervals": string, "minMs": string, "maxMs": string, "avgMs": string } ], "negotiatedLocalControlTxIntervalMs": integer, "bfdSessionInitializationMode": enum, "configUpdateTimestampMicros": string }, "md5AuthEnabled": boolean, "statusReason": enum, "ipv4NexthopAddress": string, "peerIpv4NexthopAddress": string, "enableIpv4": boolean } ], "natStatus": [ { "name": string, "userAllocatedNatIpResources": [ string ], "drainUserAllocatedNatIps": [ string ], "userAllocatedNatIps": [ string ], "autoAllocatedNatIps": [ string ], "drainAutoAllocatedNatIps": [ string ], "minExtraNatIpsNeeded": integer, "numVmEndpointsWithNatMappings": integer, "ruleStatus": [ { "ruleNumber": integer, "activeNatIps": [ string ], "drainNatIps": [ string ], "minExtraIpsNeeded": integer, "numVmEndpointsWithNatMappings": integer } ] } ] } } |
Fields | |
---|---|
kind |
Type of resource. |
result |
|
result. |
URI of the network to which this router belongs. |
result. |
A list of the best dynamic routes for this Cloud Router's Virtual Private Cloud (VPC) network in the same region as this Cloud Router. Lists all of the best routes per prefix that are programmed into this region's VPC data plane. When global dynamic routing mode is turned on in the VPC network, this list can include cross-region dynamic routes from Cloud Routers in other regions. |
result. |
[Output Only] Type of this resource. Always |
result. |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
result. |
[Output Only] Creation timestamp in RFC3339 text format. |
result. |
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. |
An optional description of this resource. Provide this field when you create the resource. |
result. |
Fully-qualified URL of the network that this route applies to. |
result. |
A list of instance tags to which this route applies. |
result. |
The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format. |
result. |
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. |
The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: |
result. |
The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. |
result. |
The URL of the local network if it should handle matching packets. |
result. |
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. |
[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. |
result. |
The URL to a forwarding rule of type
|
result. |
[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
result. |
[Output Only] A warning code, if applicable. For example, Compute Engine returns |
result. |
[Output Only] A human-readable description of the warning code. |
result. |
[Output Only] Metadata about this warning in "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
result. |
[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. |
[Output Only] A warning data value corresponding to the key. |
result. |
The URL to a VpnTunnel that should handle matching packets. |
result. |
[Output Only] The full resource name of the Network Connectivity Center hub that will handle matching packets. |
result. |
[Output Only] Server-defined fully-qualified URL for this resource. |
result. |
[Output Only] The type of this route, which can be one of the following values: |
result. |
[Output Only] AS path. |
result. |
[Output Only] The type of the AS Path, which can be one of the following values: |
result. |
[Output Only] The AS numbers of the AS Path. |
result. |
[Output only] The status of the route. |
result. |
[Output Only] Indicates the origin of the route. Can be |
result. |
[Output Only] Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network. |
result. |
[Output only] Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions. |
result. |
A list of the best BGP routes learned by this Cloud Router. It is possible that routes listed might not be programmed into the data plane, if the Google Cloud control plane finds a more optimal route for a prefix than a route learned by this Cloud Router. |
result. |
[Output Only] Type of this resource. Always |
result. |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
result. |
[Output Only] Creation timestamp in RFC3339 text format. |
result. |
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. |
An optional description of this resource. Provide this field when you create the resource. |
result. |
Fully-qualified URL of the network that this route applies to. |
result. |
A list of instance tags to which this route applies. |
result. |
The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format. |
result. |
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. |
The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: |
result. |
The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. |
result. |
The URL of the local network if it should handle matching packets. |
result. |
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. |
[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. |
result. |
The URL to a forwarding rule of type
|
result. |
[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
result. |
[Output Only] A warning code, if applicable. For example, Compute Engine returns |
result. |
[Output Only] A human-readable description of the warning code. |
result. |
[Output Only] Metadata about this warning in "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
result. |
[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. |
[Output Only] A warning data value corresponding to the key. |
result. |
The URL to a VpnTunnel that should handle matching packets. |
result. |
[Output Only] The full resource name of the Network Connectivity Center hub that will handle matching packets. |
result. |
[Output Only] Server-defined fully-qualified URL for this resource. |
result. |
[Output Only] The type of this route, which can be one of the following values: |
result. |
[Output Only] AS path. |
result. |
[Output Only] The type of the AS Path, which can be one of the following values: |
result. |
[Output Only] The AS numbers of the AS Path. |
result. |
[Output only] The status of the route. |
result. |
[Output Only] Indicates the origin of the route. Can be |
result. |
[Output Only] Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network. |
result. |
[Output only] Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions. |
result. |
|
result. |
Name of this BGP peer. Unique within the Routers resource. |
result. |
URL of the VPN tunnel that this BGP peer controls. |
result. |
[Output only] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session. |
result. |
IP address of the local BGP interface. |
result. |
IP address of the remote BGP interface. |
result. |
IPv6 address of the local BGP interface. |
result. |
IPv6 address of the remote BGP interface. |
result. |
Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. |
result. |
Status of the BGP peer: {UP, DOWN} |
result. |
The state of the BGP session. For a list of possible values for this field, see BGP session states. |
result. |
Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds |
result. |
Time this session has been up, in seconds. Format: 145 |
result. |
Number of routes learned from the remote BGP Peer. |
result. |
Routes that were advertised to the remote BGP peer |
result. |
[Output Only] Type of this resource. Always |
result. |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
result. |
[Output Only] Creation timestamp in RFC3339 text format. |
result. |
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. |
An optional description of this resource. Provide this field when you create the resource. |
result. |
Fully-qualified URL of the network that this route applies to. |
result. |
A list of instance tags to which this route applies. |
result. |
The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format. |
result. |
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. |
The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: |
result. |
The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. |
result. |
The URL of the local network if it should handle matching packets. |
result. |
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. |
[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. |
result. |
The URL to a forwarding rule of type
|
result. |
[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
result. |
[Output Only] A warning code, if applicable. For example, Compute Engine returns |
result. |
[Output Only] A human-readable description of the warning code. |
result. |
[Output Only] Metadata about this warning in "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
result. |
[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. |
[Output Only] A warning data value corresponding to the key. |
result. |
The URL to a VpnTunnel that should handle matching packets. |
result. |
[Output Only] The full resource name of the Network Connectivity Center hub that will handle matching packets. |
result. |
[Output Only] Server-defined fully-qualified URL for this resource. |
result. |
[Output Only] The type of this route, which can be one of the following values: |
result. |
[Output Only] AS path. |
result. |
[Output Only] The type of the AS Path, which can be one of the following values: |
result. |
[Output Only] The AS numbers of the AS Path. |
result. |
[Output only] The status of the route. |
result. |
[Output Only] Indicates the origin of the route. Can be |
result. |
[Output Only] Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network. |
result. |
[Output only] Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions. |
result. |
|
result. |
Session uptime in milliseconds. Value will be 0 if session is not up. |
result. |
The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880 |
result. |
The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880 |
result. |
Control packet counts for the current BFD session. |
result. |
Number of packets transmitted since the beginning of the current BFD session. |
result. |
Number of packets received since the beginning of the current BFD session. |
result. |
Number of packets received that were successfully processed since the beginning of the current BFD session. |
result. |
Number of packets received that were rejected because of errors since the beginning of the current BFD session. |
result. |
The most recent Tx control packet for this BFD session. |
result. |
The version number of the BFD protocol, as specified in section 4.1 of RFC5880. |
result. |
The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880 |
result. |
The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880 |
result. |
The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880 |
result. |
The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The most recent Rx control packet for this BFD session. |
result. |
The version number of the BFD protocol, as specified in section 4.1 of RFC5880. |
result. |
The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880 |
result. |
The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880 |
result. |
The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880 |
result. |
The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880 |
result. |
Inter-packet time interval statistics for control packets. |
result. |
The type of packets for which inter-packet intervals were computed. |
result. |
From how long ago in the past these intervals were observed. |
result. |
Number of inter-packet intervals from which these statistics were derived. |
result. |
Minimum observed inter-packet interval in milliseconds. |
result. |
Maximum observed inter-packet interval in milliseconds. |
result. |
Average observed inter-packet interval in milliseconds. |
result. |
Negotiated transmit interval for control packets. |
result. |
The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. |
result. |
Unix timestamp of the most recent config update. |
result. |
Informs whether MD5 authentication is enabled on this BGP peer. |
result. |
Indicates why particular status was returned. |
result. |
IPv4 address of the local BGP interface. |
result. |
IPv4 address of the remote BGP interface. |
result. |
Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. |
result. |
|
result. |
Unique name of this NAT. |
result. |
A list of fully qualified URLs of reserved IP address resources. |
result. |
A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. |
result. |
A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133". |
result. |
A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"] |
result. |
A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. |
result. |
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. |
Number of VM endpoints (i.e., Nics) that can use NAT. |
result. |
Status of rules in this NAT. |
result. |
Rule number of the rule. |
result. |
A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"]. |
result. |
A list of IPs for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. |
result. |
The number of extra IPs to allocate. This will be greater than 0 only if the existing IPs in this NAT Rule are NOT enough to allow all configured VMs to use NAT. |
result. |
Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/compute.readonly
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 IAM permissions:
compute.routers.get
To find predefined roles that contain those permissions, see Compute Engine IAM Roles.