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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ListTransitRouterRouteTableAssociations |
get |
TransitRouterPeerAttachment
TransitRouterRouteTable
|
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.
|
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 |
| Status |
string |
No |
The status of the association.
|
Active |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
The response. |
||
| NextToken |
string |
The token 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.
|
Associating |
| ResourceType |
string |
The type of the next hop resource.
|
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.