All Products
Search
Document Center

Cloud Enterprise Network:PublishRouteEntries

Last Updated:Oct 22, 2024

Cloud Enterprise Network (CEN) supports route advertisement. You can call this operation to advertise routes of virtual private clouds (VPCs) or virtual border routers (VBRs) attached to a CEN instance to the CEN instance. Other network instances attached to the CEN instance can learn the routes if route conflicts do not exist.

Operation description

The following table describes whether routes of different types are advertised to CEN by default. You can call the PublishRouteEntries operation to advertise routes to CEN.

RouteNetwork instanceAdvertised to CEN by default
Routes that route network traffic to Elastic Compute Service (ECS) instancesVPCNo
Routes that route network traffic to VPN gatewaysVPCNo
Routes that route network traffic to high-availability virtual IP addresses (HAVIPs)VPCNo
Routes that route network traffic to router interfacesVPCNo
Routes that route network traffic to elastic network interfaces (ENIs)VPCNo
Routes that route network traffic to IPv6 gatewaysVPCNo
Routes that route network traffic to NAT gatewaysVPCNo
System routes of VPCsVPCYes
Routes that route network traffic to data centersVBRYes
Border Gateway Protocol (BGP) routesVBRYes

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.

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:PublishRouteEntriesupdate
  • CenInstance
    acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}
  • virtualborderrouter
    acs:vpc:*:{#accountId}:virtualborderrouter/{#virtualborderrouterId}
  • VPC
    acs:vpc:*:{#accountId}:vpc/{#vpcId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CenIdstringYes

The ID of the CEN instance.

cen-7qthudw0ll6jmc****
ChildInstanceIdstringYes

The ID of the network instance.

vpc-rj9gt5nll27onu****
ChildInstanceTypestringYes

The type of the network instance. Valid values:

  • VPC: VPC
  • VBR: VBR
VPC
ChildInstanceRegionIdstringYes

The ID of the region where the network instance is deployed.

You can call the DescribeChildInstanceRegions operation to query the most recent region list.

us-west-1
ChildInstanceRouteTableIdstringYes

The ID of the route table configured on the network instance.

vtb-bp174d1gje7****
DestinationCidrBlockstringYes

The destination CIDR block of the route that you want to advertise.

172.16.1.0/24

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

FBDB18D8-E91E-4978-8D6C-6E2E3EE10133

Examples

Sample success responses

JSONformat

{
  "RequestId": "FBDB18D8-E91E-4978-8D6C-6E2E3EE10133"
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterIllegal.AliUidThe parameter of aliUid is illegal.The error message returned because the specified account ID is invalid.
400InvalidOperation.UnsupportnexthopTypeThe nexthop type is unsupportedThe error message returned because the next hop type does not support this operation.
400InvalidOperation.NotFoundRouteThe specified route does not exist.The error message returned because the route does not exist.
400ParameterIllegal.CenInstanceIdThe parameter of CEN instance id is illegal.The error message returned because the specified ID of the CEN instance is invalid.
400ParameterIllegal.ChildInstanceRegionIdThe parameter of child instance region id is illegal.The error message returned because the ID of the region where the network instance is created is invalid.
400ParameterIllegal.ChildInstanceTypeThe parameter of child instance type is illegal.The error message returned because the specified type of network instance is invalid.
400InvalidOperation.UnsupportRouteTableTypeThe route table type is unsupportedThe error message returned because the specified route table type does not support this operation.
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.
404Instance.NotExistThe instance is not exist.The error message returned because the specified instance does not exist.
409InvalidOperation.ChildInstanceStatusThe child-instance is not in a valid state for the operation.The error message returned because the operation is not allowed when the network instance is being processed. Try again later.
409InvalidOperation.CenInstanceStatusThe 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.

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

Change history

Change timeSummary of changesOperation
No change history