All Products
Search
Document Center

Cloud Enterprise Network:ListTransitRouterRouteEntries

Last Updated:Nov 06, 2023

Queries the routes in a route table of an Enterprise Edition transit router.

debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cen:ListTransitRouterRouteEntriesList
  • TransitRouterRouteEntry
    acs:cen:*:{#accountId}:centransitrouterroutentry/{#centransitrouterroutentryId}
  • TransitRouterRouteTable
    acs:cen:*:{#accountId}:centransitrouterroutetable/{#centransitrouterroutetableId}
  • TransitRouterRouteEntry
    acs:cen:*:{#accountId}:centransitrouterroutentry/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MaxResultsintegerNo

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

20
TransitRouterRouteEntryDestinationCidrBlockdeprecatedstringNo

The destination CIDR block of the route.

192.168.0.0/24
TransitRouterRouteEntryStatusstringNo

The status of the route. Valid values:

  • Creating: The route is being created.
  • Active: The route is available.
  • Deleting: The route is being deleted.
Active
TransitRouterRouteTableIdstringYes

The ID of the route table of the Enterprise Edition transit router.

vtb-bp1dudbh2d5na6b50****
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
fce19****
TransitRouterRouteEntryNamesarrayNo

The route name.

The name must be 0 to 128 characters in length, and can contain letters, digits, and the following special characters: , . ; / @ _ -.

You can specify at most 20 route names in each call.

Note You can use only this parameter to query static routes.
stringNo

The route name.

The name must be 0 to 128 characters in length, and can contain letters, digits, and the following special characters: , . ; / @ _ -.

You can specify at most 20 route names in each call.

Note You can use only this parameter to query static routes.
testname
TransitRouterRouteEntryIdsarrayNo

The route entry ID.

You can specify at most 20 route IDs in each call.

Note You can use only this parameter to query static routes.
stringNo

The route entry ID.

You can specify at most 20 route IDs in each call.

Note You can use only this parameter to query static routes.
rte-oklkgwmj97z6dn****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

NextTokenstring

The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values:

  • If the NextToken parameter is empty, no next page exists.
  • If a value of NextToken was returned in the previous query, specify the value to obtain the next set of results.
fce19****
RequestIdstring

The request ID.

C3835E5E-1504-4344-B1BB-98A4110F1079
TotalCountinteger

The total number of entries returned.

6
MaxResultsinteger

The number of entries returned per page.

20
TransitRouterRouteEntriesobject []

The queried routes.

TransitRouterRouteEntryIdstring

The route ID.

Note This parameter is returned only for static routes.
rte-oklkgwmj97z6dn****
TransitRouterRouteEntryDestinationCidrBlockstring

The destination CIDR block of the route.

192.168.0.0/24
TransitRouterRouteEntryTypestring

The type of the route. Valid values:

  • Static: a static route
  • Propagated: an automatically learned route
Static
CreateTimestring

The time when the route was created.

The time follows the ISO8601 standard in the YYYY-MM-DDThh:mmZ format. The time is displayed in UTC.

Note This parameter is returned only for static routes.
2021-06-15T07:01Z
TransitRouterRouteEntryNamestring

The route name.

Note This parameter is returned only for static routes.
testname
TransitRouterRouteEntryStatusstring

The status of the route. Valid values:

  • Creating: The route is being created.
  • Active: The route is available.
  • Deleting: The route is being deleted.
Active
TransitRouterRouteEntryNextHopTypestring

The type of next hop. Valid values:

  • BlackHole: a blackhole route. Packets destined for the destination CIDR block of the route are dropped.
  • Attachment: a network instance connection. Packets destined for the destination CIDR block of the route are forwarded to the specified network instance connection.
BlackHole
TransitRouterRouteEntryNextHopIdstring

The ID of the next hop.

tr-attach-vx6iwhjr1x1j78****
TransitRouterRouteEntryDescriptionstring

The description of the route.

Note This parameter is returned only for static routes.
CidrRoute
OperationalModeboolean

Indicates whether the route can be managed. Valid values:

  • true: The route can be managed. You can delete the route.
  • false: The route cannot be managed because it is automatically generated by the system.
false
Tagstring

The tag of the route.

Only PermitVbr may be returned, which indicates that the route is advertised only to the route table of the virtual border router (VBR) that is connected to the transit router.

Note This parameter is returned only for automatically learned routes.
PermitVbr

Examples

Sample success responses

JSONformat

{
  "NextToken": "fce19****",
  "RequestId": "C3835E5E-1504-4344-B1BB-98A4110F1079",
  "TotalCount": 6,
  "MaxResults": 20,
  "TransitRouterRouteEntries": [
    {
      "TransitRouterRouteEntryId": "rte-oklkgwmj97z6dn****",
      "TransitRouterRouteEntryDestinationCidrBlock": "192.168.0.0/24",
      "TransitRouterRouteEntryType": "Static",
      "CreateTime": "2021-06-15T07:01Z",
      "TransitRouterRouteEntryName": "testname",
      "TransitRouterRouteEntryStatus": "Active",
      "TransitRouterRouteEntryNextHopType": "BlackHole",
      "TransitRouterRouteEntryNextHopId": "tr-attach-vx6iwhjr1x1j78****",
      "TransitRouterRouteEntryDescription": "CidrRoute",
      "OperationalMode": false,
      "Tag": "PermitVbr",
      "TransitRouterRouteEntryNextHopResourceId": "vpc-m5ent6du8deaq5*****",
      "TransitRouterRouteEntryNextHopResourceType": "VPC",
      "TransitRouterRouteEntryOriginResourceType": "VPC",
      "TransitRouterRouteEntryOriginResourceId": "vpc-m5ent6du8deaq5*****",
      "PrefixListId": "pl-k1ainl66z3527773d****",
      "PathAttributes": {
        "Communities": [
          "65501:1"
        ],
        "AsPaths": [
          "65501"
        ],
        "OriginInstanceId": "vbr-m5ent6du8deaq5*****\n",
        "OriginInstanceType": "VBR",
        "OriginRouteType": "BGP",
        "Preference": 50
      }
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.TransitRouterRouteTableIdTransitRouterRouteTableId is illegal.The error message returned because the route table ID of the transit router (TransitRouterRouteTableId) is invalid.
400IllegalParam.TransitRouterRouteEntryStatusTransitRouterRouteEntryStatus is illegal.The error message returned because the status of the route on the transit router (TransitRouterRouteEntryStatus) is invalid.
400IllegalParam.NextTokenNextToken is illegal.The error message returned because the NextToken parameter is set to an invalid value.
400ParamExclusive.RouteEntryIdsAndStatusTransitRouterRouteEntryIds and TransitRouterRouteEntryStatus is mutually exclusive.The error message returned because the TransitRouterRouteEntryIds and TransitRouterRouteEntryStatus parameters conflict with each other.
400InvalidTransitRouterRouteTableId.NotFoundTransitRouterRouteTableId is not found.The error message returned because the specified route table ID of the transit router does not exist.
400FilterKeyDuplicated.RouteFilterThe keys in RouteFilter are duplicated.The error message returned because RouteFilter contains duplicate key values.
400InvalidFilterKeyThe key in filter is invalid.The key in filter is invalid.
400IllegalParam.TransitRouterRouteEntryNextHopTypeTransitRouterRouteEntryNextHopType is invalid.The error message returned because the TransitRouterRouteEntryNextHopType parameter is set to an invalid value.
400IllegalParam.TransitRouterRouteEntryNextHopAttachmentIdTransitRouterRouteEntryNextHopAttachmentId is invalid.The error message returned because TransitRouterRouteEntryNextHopAttachmentId is set to an invalid value.
400IllegalParam.TransitRouterRouteEntryNextHopResourceIdTransitRouterRouteEntryNextHopResourceId is invalid.The error message returned because TransitRouterRouteEntryNextHopResourceId is set to an invalid value.
400IllegalParam.TransitRouterRouteEntryNextHopResourceTypeTransitRouterRouteEntryNextHopResourceType is invalid.The error message returned because TransitRouterRouteEntryNextHopResourceType is set to an invalid value.
400IllegalParam.TransitRouterRouteEntryOriginResourceIdTransitRouterRouteEntryOriginResourceId is invalid.The error message returned because TransitRouterRouteEntryOriginResourceId is set to an invalid value.
400IllegalParam.TransitRouterRouteEntryOriginResourceTypeTransitRouterRouteEntryOriginResourceType is invalid.The error message returned because TransitRouterRouteEntryOriginResourceType is set to an invalid value.
400IllegalParam.TransitRouterRouteEntryTypeTransitRouterRouteEntryType is invalid.The error message returned because TransitRouterRouteEntryType is set to an invalid value.
400IllegalParam.PrefixExactMatchCidrPrefixExactMatchCidr is invalid.The error message returned because PrefixExactMatchCidr is set to an invalid value.
400IllegalParam.LongestPrefixMatchCidrLongestPrefixMatchCidr is invalid.The error message returned because LongestPrefixMatchCidr is set to an invalid value.
400IllegalParam.SubnetOfMatchCidrSubnetOfMatchCidr is invalid.The error message returned because SubnetOfMatchCidr is set to an invalid value.
400IllegalParam.SupernetOfMatchCidrSupernetOfMatchCidr is invalid.The error message returned because SupernetOfMatchCidr is set to an invalid value.
400InvalidParameterInvalid parameter.The error message returned because the parameter is set to an invalid value.
400UnauthorizedThe AccessKeyId is unauthorized.The error message returned because you do not have the permissions to perform this operation.
404InvalidRouteTableId.NotFoundThe specified RouteTableId is not found.The specified route table ID does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-13The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
Output ParametersThe response structure of the API operation changes.
2023-07-07The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
Output ParametersThe response structure of the API operation changes.
2023-07-07The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
Output ParametersThe response structure of the API operation changes.
2023-04-04The error codes of the API operation change.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 404
2023-03-02The error codes of the API operation change.,The input parameters of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 404
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: TransitRouterRouteEntryType
    Added Input Parameters: TransitRouterRouteEntryNextHopType
    Added Input Parameters: TransitRouterRouteEntryNextHopId
    Added Input Parameters: TransitRouterRouteEntryNextHopResourceId
    Added Input Parameters: TransitRouterRouteEntryNextHopResourceType
    Added Input Parameters: TransitRouterRouteEntryOriginResourceId
    Added Input Parameters: TransitRouterRouteEntryOriginResourceType
    Added Input Parameters: PrefixListId
    Added Input Parameters: RouteFilter
Output ParametersThe response structure of the API operation changes.