Query the Route List

Function

This API is used to query the list of routes of a VPC peering connection.

URI

  • URI format

    GET /v1.0/{project_id}/reserved_cluster/{cluster_id}/peering/{peering_id}/route

  • Parameter description
    Table 1 URI parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

    cluster_id

    Yes

    Cluster ID.

    peering_id

    Yes

    ID of the VPC peering connection.

Request

None

Response

  • Example response
    {  
       "routes":[{  
          "type":"peering",
          "nexthop":"7e974044-bcc1-4f25-aff8-5f10cb347b0f",
          "destination":"192.168.0.0/16",
          "vpc_id":"83081290-198e-48e2-8e2d-64c50023d136",
          "tenant_id":"8185f87d043f4519a68420a282b5e2fa",
          "id":"75d289f7-9022-4950-a137-fed7aeae9cb1"
       }]
    }
  • Parameter description
    Table 2 Response parameters

    Parameter

    Mandatory

    Type

    Description

    type

    Yes

    String

    Route type. Generally, this parameter is set to peering.

    nexthop

    Yes

    String

    Next hop address of a route. Generally, this parameter is set to the ID of the VPC peering connection.

    destination

    Yes

    String

    Destination IP address or CIDR block.

    vpc_id

    Yes

    String

    ID of the VPC for which a route is to be added.

    tenant_id

    Yes

    String

    ID of the tenant who requests to add a route.

    id

    Yes

    String

    ID of a route.

Status Code

Table 3 Status Code

Status Code

Description

200

Route list query succeeds.

400

The input parameter is invalid.

500

Failed to complete the request because of an internal service error.

Error Code

For details, see Error Codes.