Querying the Route Table of a VPN Gateway
Function
This API is used to query the route table of a VPN gateway with a specified ID.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/vpn-gateways/{vgw_id}/routing-table
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
vgw_id |
String |
Yes |
Specifies a VPN gateway ID. |
Request
Response
- Response parameters
Returned status code 200: successful query
Table 2 Parameters in the response body Parameter
Type
Description
routing_table
Array of Route objects
Indicates the route table of a specified VPN gateway.
total_count
Long
Specifies the total number of routes on the gateway.
page_info
Specifies pagination information.
Table 3 Route Parameter
Type
Description
destination
String
Specifies the destination address of a route.
nexthop
String
Specifies the next-hop IP address.
outbound_interface_ip
String
Specifies the IP address of the outbound interface.
origin
String
- Specifies the origin of a BGP route.
- The value can be igp, egp, or incomplete.
as_path
String
Specifies the AS_Path of a BGP route.
med
Integer
Specifies the MED value of a BGP route.
nexthop_resource
NexthopResource object
Specifies the next hop resource of a route.
- Example response
- Example response to the request for querying a public VPN gateway associated with an enterprise router
{ "routing_table": [ { "destination": "192.168.0.0/24", "nexthop": "192.168.0.240", "outbound_interface_ip": "192.168.0.240", "origin": "igp", "as_path": "64513", "med": 0, "nexthop_resource": { "id": "fd8e4220-cdcd-4c84-809e-09fd3148b24b", "type": "vpn_connection" } }, { "destination": "222.69.222.1/32", "nexthop": "169.254.1.2", "outbound_interface_ip": "169.254.1.1", "origin": "igp", "as_path": "64513", "med": 0, "nexthop_resource": { "id": "e3c28cc1-fb34-4acd-97f9-29d8e42efe0f", "type": "vpn_gateway" } }, { "destination": "222.69.222.2/32", "nexthop": "169.254.2.2", "outbound_interface_ip": "169.254.2.1", "origin": "igp", "as_path": "64513", "med": 0, "nexthop_resource": { "id": "85d31993-f519-49ea-8d2e-7afeffb8ef5e", "type": "vpn_connection" } } ], "total_count": 3, "page_info": { "current_count": 3 } }
- Example response to the request for querying a public VPN gateway associated with an enterprise router
Status Codes
For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot