Querying VPC Routes

Function

This API is used to query all routes of the tenant submitting the request. The routes are filtered based on the filtering condition. For details about the response format of pagination query, see section Pagination.

URI

GET /v2.0/vpc/routes

Example:

Example:
GET https://{Endpoint}/v2.0/vpc/routes?id={id}&vpc_id={vpc_id}&tenant_id={tenant_id}&destination={destination}&type={type}&limit={limit}&marker={marker}
Table 1 describes the parameters.
Table 1 Parameter description

Name

Mandatory

Type

Description

id

No

String

Specifies that the route ID is used as the filtering condition.

tenant_id

No

String

Specifies that the tenant ID is used as the filtering condition.

vpc_id

No

String

Specifies that the VPC ID is used as the filtering condition.

destination

No

String

Specifies that the route destination address (CIDR) is used as the filtering condition.

type

No

String

Specifies that the type is used as the filtering condition. Currently, the value can only be peering.

marker

No

String

Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID.

This parameter can work together with the parameter limit.

  • If parameters marker and limit are not passed, all resource records will be returned.
  • If the parameter marker is not passed and the value of parameter limit is set to 10, the first 10 resource records will be returned.
  • If the value of the parameter marker is set to the resource ID of the 10th record and the value of parameter limit is set to 10, the 11th to 20th resource records will be returned.
  • If the value of the parameter marker is set to the resource ID of the 10th record and the parameter limit is not passed, resource records starting from the 11th records (including 11th) will be returned.

limit

No

Integer

Specifies the number of records that will be returned on each page. The value is from 0 to intmax.

limit can be used together with marker. For details, see the parameter description of marker.

The default value is 2000.

Request Message

Response Message

Status Code

See Status Codes.

Error Code

See Error Codes.