All Products
Search
Document Center

Cloud Enterprise Network:ListTransitRouterRouteTableAssociations

Last Updated:Aug 07, 2025

Call the ListTransitRouterRouteTableAssociations operation to query the forwarding associations for a route table of an Enterprise Edition transit router or for a network instance connection.

Operation description

When you call the ListTransitRouterRouteTableAssociations operation, you must specify at least one of the following request parameters: TransitRouterRouteTableId and TransitRouterAttachmentId.

  • If you specify only TransitRouterRouteTableId, the operation queries the network instance connections that are associated with the specified route table of the Enterprise Edition transit router.

  • If you specify only TransitRouterAttachmentId, the operation queries the route tables of the Enterprise Edition transit router that are associated with the specified network instance connection.

  • If you specify both TransitRouterRouteTableId and TransitRouterAttachmentId, the operation queries the forwarding association between the network instance connection and the route table of the Enterprise Edition transit router.
    • If a forwarding association exists between the network instance connection and the route table, the details of the forwarding association are returned.

    • If no forwarding association exists between the network instance connection and the route table, the TransitRouterAssociations array is empty in the response.

Make sure that you provide valid parameter values when you call the ListTransitRouterRouteTableAssociations operation. If you provide an invalid parameter, the system returns a RequestId but does not query the forwarding associations for the route table of the Enterprise Edition transit router or the network instance connection.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cen:ListTransitRouterRouteTableAssociations

get

TransitRouterPeerAttachment

acs:cen:*:{#accountId}:centransitrouterattachment/{#centransitrouterattachmentId}

TransitRouterRouteTable

acs:cen:*:{#accountId}:centransitrouterroutetable/{#TransitRouterRouteTableId}

None None

Request parameters

Parameter

Type

Required

Description

Example

MaxResults

integer

No

The number of entries to return on each page. Default value: 50.

50

NextToken

string

No

The token for the next query.

  • You do not need to specify this parameter for the first query.

  • For a subsequent query, set this parameter to the NextToken value returned from the previous query.

a415****

TransitRouterRouteTableId

string

No

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

vtb-bp1dudbh2d5na6b50****

TransitRouterAttachmentId

string

No

The ID of the network instance connection.

tr-attach-nls9fzkfat8934****

TransitRouterAttachmentResourceId

string

No

The ID of the next hop resource.

vpc-bp1h8vbrbcgohcju5****

TransitRouterAttachmentResourceType

string

No

The type of the next hop resource.

  • VPC: virtual private cloud (VPC).

  • VBR: virtual border router (VBR).

  • TR: transit router.

  • VPN: VPN connection.

VPC

Status

string

No

The status of the association.

  • Active: The association is active.

  • Associating: The association is being created.

  • Dissociating: The association is being deleted.

Active

Response parameters

Parameter

Type

Description

Example

object

The response.

NextToken

string

The token for the next query.

  • If this parameter is not returned, it indicates that no more results are to be returned.

  • If a value is returned for this parameter, the value is the token that is used for the next query.

a415****

RequestId

string

The request ID.

F6B1D9AB-176D-4399-801D-8BC576F4EB0D

TotalCount

integer

The total number of entries.

1

MaxResults

integer

The number of entries returned per page.

50

TransitRouterAssociations

array<object>

A list of forwarding associations.

object

The information about the forwarding association.

TransitRouterAttachmentId

string

The ID of the network instance connection.

tr-attach-nls9fzkfat8934****

Status

string

The status of the association.

  • Active: The association is active.

  • Associating: The association is being created.

  • Dissociating: The association is being deleted.

  • Deleted: The association is deleted.

Associating

ResourceType

string

The type of the next hop resource.

  • VPC: virtual private cloud (VPC).

  • VBR: virtual border router (VBR).

  • TR: transit router.

  • VPN: VPN connection.

VPC

ResourceId

string

The ID of the next hop resource.

vpc-bp1h8vbrbcgohcju5****

TransitRouterRouteTableId

string

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

vtb-bp1dudbh2d5na6b50****

Examples

Success response

JSON format

{
  "NextToken": "a415****",
  "RequestId": "F6B1D9AB-176D-4399-801D-8BC576F4EB0D",
  "TotalCount": 1,
  "MaxResults": 50,
  "TransitRouterAssociations": [
    {
      "TransitRouterAttachmentId": "tr-attach-nls9fzkfat8934****",
      "Status": "Associating",
      "ResourceType": "VPC",
      "ResourceId": "vpc-bp1h8vbrbcgohcju5****",
      "TransitRouterRouteTableId": "vtb-bp1dudbh2d5na6b50****"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.NextToken The parameter NextToken is invalid. The error message returned because the NextToken parameter is set to an invalid value. Check the value and try again.
400 IllegalParam.MaxResults The specified MaxResults is illegal. MaxResults illegal.
400 InvalidParameter Invalid parameter. The error message returned because the parameter is set to an invalid value.
400 Unauthorized The AccessKeyId is unauthorized. The error message returned because you do not have the permissions to perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.