You can call the DescribePublishedRouteEntries operation to query information about routes advertised to network instances in a Cloud Enterprise Network (CEN) instance. The network instances include virtual private clouds (VPCs) and virtual border routers (VBRs). The returned information includes the publish status of each route, the instance type of its next hop, and whether the route can be published or withdrawn.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:DescribePublishedRouteEntries |
get |
*CenInstance
*virtualborderrouter
*VPC
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. Valid values: 1 to 500. |
10 |
| CenId |
string |
Yes |
The ID of the CEN instance. |
cen-7qthudw0ll6jm**** |
| ChildInstanceId |
string |
Yes |
The ID of the network instance. |
vpc-bp18sth14qii3pnv**** |
| ChildInstanceType |
string |
Yes |
The type of the network instance. Valid values:
|
VPC |
| ChildInstanceRegionId |
string |
Yes |
The ID of the region where the network instance is deployed. For more information, see DescribeChildInstanceRegions. |
cn-hangzhou |
| ChildInstanceRouteTableId |
string |
No |
The ID of the route table of the network instance. |
vtb-bp174d1gje79u1g4**** |
| DestinationCidrBlock |
string |
No |
The destination CIDR block of the route that you want to query. |
172.16.0.0/16 |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
FF1A7B2A-677F-4F71-96EA-6002B329F437 |
| PageNumber |
integer |
The page number. |
1 |
| TotalCount |
integer |
The total number of entries returned. |
2 |
| PublishedRouteEntries |
object |
||
| PublishedRouteEntry |
array<object> |
A list of route entries. |
|
|
object |
|||
| NextHopId |
string |
The ID of the instance associated with the next hop. |
ecs-bp18sth14qii3pn**** |
| PublishStatus |
string |
The publish status of the route in the CEN instance:
|
Published |
| ChildInstanceRouteTableId |
string |
The ID of the route table of the network instance. |
vtb-il7qut3mjgtlcbpk2**** |
| NextHopType |
string |
The type of the instance associated with the next hop.
|
Instance |
| OperationalMode |
boolean |
Indicates whether the route can be published to or withdrawn from the CEN instance.
|
true |
| DestinationCidrBlock |
string |
The destination CIDR block of the route. |
172.16.0.0/16 |
| RouteType |
string |
The type of the route.
|
System |
| Conflicts |
object |
||
| Conflict |
array<object> |
A list of conflicting routes. |
|
|
object |
|||
| Status |
string |
The cause of the route conflict.
|
conflict |
| DestinationCidrBlock |
string |
The destination CIDR block of the conflicting route. |
192.168.20.0/24 |
| InstanceId |
string |
The ID of the peer network instance with which the route conflicts. |
ccn-0q3b7oviikmm9h**** |
| InstanceType |
string |
The type of the peer network instance with which the route conflicts.
|
CCN |
| RegionId |
string |
The ID of the region where the peer network instance with which the route conflicts is deployed. |
ccn-cn-shanghai |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "FF1A7B2A-677F-4F71-96EA-6002B329F437",
"PageNumber": 1,
"TotalCount": 2,
"PublishedRouteEntries": {
"PublishedRouteEntry": [
{
"NextHopId": " ecs-bp18sth14qii3pn****",
"PublishStatus": "Published",
"ChildInstanceRouteTableId": "vtb-il7qut3mjgtlcbpk2****",
"NextHopType": "Instance",
"OperationalMode": true,
"DestinationCidrBlock": "172.16.0.0/16",
"RouteType": "System",
"Conflicts": {
"Conflict": [
{
"Status": "conflict",
"DestinationCidrBlock": "192.168.20.0/24",
"InstanceId": "ccn-0q3b7oviikmm9h****",
"InstanceType": "CCN",
"RegionId": "ccn-cn-shanghai"
}
]
}
}
]
}
}
Error response
JSON format
{
"TotalCount": 2,
"PublishRouteEntries": {
"PublishRouteEntries": [
{
"DestinationCidrBlock": "100.64.0.0/10",
"NextHopId": "",
"NextHopType": "service",
"ChildInstanceRouteTableId": "vtb-il7qut3mjgtlcbpk2ie31",
"PublishStatus": "NonPublished",
"RouteConflicts": {
"RouteConflicts": []
},
"RouteType": "System"
},
{
"DestinationCidrBlock": "192.168.10.0/24",
"NextHopId": "",
"NextHopType": "local",
"ChildInstanceRouteTableId": "vtb-il7qut3mjgtlcbpk2ie31",
"PublishStatus": "Published",
"RouteConflicts": {
"RouteConflicts": []
},
"RouteType": "System"
}
]
},
"PageNumber": 1,
"RequestId": "FF1A7B2A-677F-4F71-96EA-6002B329F437",
"PageSize": 10
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterIllegal.CenInstanceId | The parameter of CEN instance id is illegal. | |
| 400 | ParameterIllegal.ChildInstanceRegionId | The parameter of child instance region id is illegal. | |
| 400 | VRC_ERROR | VRC error | |
| 400 | ParameterIllegal.ChildInstanceType | The parameter of child instance type is illegal. | |
| 400 | ParameterIllegal | The parameter is illegal. | The error message returned because a parameter is set to an invalid value. |
| 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. |
| 500 | InternalError | Internal error. | |
| 404 | Instance.NotExist | The instance is not exist. | The error message returned because the specified instance does not exist. |
| 409 | InvalidOperation.ChildInstanceStatus | The child-instance is not in a valid state for the operation. | |
| 409 | InvalidOperation.CenInstanceStatus | The CEN instance is not in a valid state for the operation. | The error message returned because the status of the CEN instance does not support this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.