全部產品
Search
文件中心

Elastic Compute Service:CreateRouteEntry -

更新時間:Apr 16, 2026

說明

目前該API介面已標記為棄用,推薦使用替代API:Vpc(2016-04-28) - CreateRouteEntry

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

vpc:CreateRouteEntry

create

*RouteTable

acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

RouteTableId

string

DestinationCidrBlock

string

NextHopId

string

ClientToken

string

NextHopType

string

NextHopList

array<object>

object

NextHopId

string

NextHopType

string

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

樣本

正常返回樣本

JSON格式

{
  "RequestId": ""
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 MissingParameter Miss mandatory parameter. 參數不得為空白。
400 InvalidCidrBlock.Malformed Specified CIDR block is not valid. 指定的CIDR格式不正確。
400 InvalidCIDRBlock.Duplicate Specified CIDR block is already exists. 指定的網段已經在該路由表中存在。
400 IncorrectVpcStatus Current VPC status does not support this operation. 當前Virtual Private Cloud 的狀態無法支援這個操作。
400 QuotaExceeded Route entry quota exceeded in this route table. 路由器介面已達上限。
400 IncorrectRouteEntryStatus Some route entry status blocked this operation. 無法執行該操作,當前路由表中有路由條目的狀態為 pending 或 modifying。
400 InvalidCidrBlock Specified CIDR block is not valid. 可能的報錯原因:1. 您不在 10.0.0.0/8 的路由網段的白名單中,不能使用該網段。2. 添加的自訂路由目標網段不能從屬於同一個 VPC 下面所有交換器的網段。3. 網段不能是 100.64.0.0/10。
400 InvalidNextHopType Specified parameter "NextHopType" is not valid
400 InvalidNextHop.NotFound Specified next hop does not exist.
400 InvalidVRouter.NotFound vRouter not exists.
400 InvalidVPC.NotFound vpc not exists.
400 InvalidNexthopTypeAndList.BothNull both nexthopType and nextHopList are null. NextHopType 參數和 NextHopList 參數不可為空。
400 InvalidNexthopTypeAndList.BothNotNull both nexthopType and nextHopList are not null. NextHopType 參數和 NextHopList 參數不可為空。
400 InvalidRouterInterface invalid router interface. 路由器介面不合法。
400 InvalidOppositeRouterType nexthop list cannot only contain router interface whose opposite router interface is on vbr. 下一跳列表裡不能只包含一種路由器介面,它們的對端路由器介面在虛擬邊界路由器上。
400 InvalidNexthopListSize nexthop size is illegal. Must be between 2 and 4. 下一跳的長度必須為 2-4 個字元。
400 InvalidEntryRuleQuota.NotFound Route entry quota rule not exists. 路由條目引用規則不存在。
400 Forbidden.CheckEntryRuleQuota Route entry quota rule check error. 路由條目配額規則檢查有誤。
400 InvalidVBRStatus invalid virtual border router status. 虛擬邊界路由器狀態不合法。
400 InvalidPhysicalConnectionBusinessStatus invalid physical connection business status. 物理專線狀態不合法。
400 InvalidRouterType Cannot specify nexthop list in vbr's route table.
400 IncorrectHaVipStatus This operation is denied because satus of the specified HaVip is neither Available nor InUse. 指定的私網高可用虛擬IP(HaVip)狀態不是“可用”和“使用中”,操作被拒絕。
400 CountLimitExceed.HaVipRouteEntry There can be 5 route entry to HaVip at most in one route table.
400 InvalidRouteEntry.Duplicate The route entry already exist. 指定的路由條目已存在。
400 InvalidParam The Ecmp routerEntry with router interfaces local vgw vip not match. 路由條目與路由器介面本地視頻網關 VIP 不匹配。
400 INVALID_WEIGHT_PARAM Specified value of weight invalid 指定的權重值不合法。
400 FORBIDDEN_USE_VPC_AS_INTERNET_GATEWAY The Specified CIDR must be in vpc CIDR.
400 InvalidNexthop The Specified nexthop illegal.
400 INVALID_VPC_ID The Specified VpcId not match. 指定的 VpcId 不匹配。
400 InvalidRouteEntrySize The Specified routerEntry size not legal. 指定的路由條目大小不合法。
400 TaskConflict The operation is too frequent, please wait a moment and try again. 操作過於頻繁,請稍等一會再重試
400 InvalidRouteEntry Specified routeEntry not exist.
400 InvalidDestinationCidrBlock The specified destinationCidrBlock must not included in black list cidr.
400 VswitchStatusError The VSwitch is creating .
400 Forbidden.PrivateIpNotFound Private ip address not exist.
400 RouteConflict.AlreadyExist Route conflict exists in routing table.
400 OperationUnsupported.InactiveMode Vpc multi scope route only support active standby.
400 IncorrectStatus.MultiScopeRiRouteEntry MultiScope ri status must not in idle.
400 OperationUnsupported.MoreThanOneVpnOrHavip MultiScope can not support more than one vpn/havip.
400 OperationUnsupported.EcmpRiTypeOrNumber Emcp entry not supported if vpc-vbr or vbr-vlan ri does not exist.
400 Duplicated.VpcNextHop Route entry nexthop duplicate.
400 OperationUnsupported.SubRouteTableECMP Vpc subRouteTable don't support ecmp or multiScope.
400 InvalidNexthop.NotFound VRouterEntry nexthop does not exist.
400 IllegalParam.NextHopId Instance not exists or not vpc vm.
400 InvalidVpnInstanceId.NotFound %s
400 OperationFailed.ScopeActiveRouteEntryType %s
400 OperationFailed.ScopeStandbyRouteEntryQuota %s
400 OperationFailed.ScopeActiveRouteEntryQuota %s
400 OperationUnsupported.ScopeInvalidRouteType %s
400 OperationFailed.EcmpInvalidRouterInterfaceOppositeType %s
400 QuotaExceeded.HaVipRouteEntry Vpc havip route entry quota exceed.
400 OperationFailed.InvalidNexthop vpc multi scope route must has a enable nexthop.
400 OperationFailed.NotifyCenDelete Failed to notify cen when delete route entry.
400 InvalidNatGateway.NotFound Natgateway not exist.
400 OperationFailed.CxpRouteExist Cxp route alreay existed.
400 InvalidNexthop.DirectEni The direct Eni cannot be nexthop.
400 OperationFailed.NotifyCenCreate Failed to notify cen when create route entry.
400 IncorrectStatus.RouteTableStatus %s
400 OperationFailed.GetEniInfo Failed to get networkInterface info.
400 QuotaExceeded.EcmpRouteEntryNextHopCount %s
400 OperationFailed.InvalidNextHopType %s
400 OperationUnsupported.InvalidRouterInterfaceType Only vpc vbr interface support ecmp route.
400 InvalidHaVip.NotFound The specified HaVip does not exist in the specified region.
400 OperationFailed.MultiScopeType The specified nexthop type is not support in multiScope.
400 OperationFailed.DistibuteLock Distibute lock fail.
403 IncorrectInstanceStatus The current status of the resource does not support this operation.
404 InvalidNatGatewayId.NotFound Specified value of NatGatewayId is not found in our record.
404 InvalidInstanId.NotFound Specified instance does not exist. 指定的執行個體不存在,請您檢查該執行個體是否正確。
404 InvalidNextHopId.NotFound Specified next hop does not exist. 指定的下一跳不存在。
404 InvalidRouteTableId.NotFound Specified route table does not exist. 指定的虛擬路由表不存在。
404 InvalidHaVipId.NotFound The specified HaVip does not exist in the specified VPC.
404 InvalidNetworkInterface.NotFound The specified networkInterface does not exist.
404 InvalidVpc.NotFound Specified vpc is not found in our record.
404 OperationFailed.InstanceDismatchCurrentVpc The specified instance does not exist in current vpc.
404 InvalidIpv6Gateway.NotFound Specified Ipv6Gateway does not exist.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情