すべてのプロダクト
Search
ドキュメントセンター

Elastic Compute Service:CreateRouteEntry

最終更新日:Apr 17, 2026

説明

この API は廃止されました。一時的にアクセス可能ですが、更新やバグ修正対応は一切行われません。代わりに Vpc(2016-04-28) - CreateRouteEntry への移行を推奨します。より強化された機能に加え、サポートも引き続きご利用いただけます。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

vpc:CreateRouteEntry

create

*RouteTable

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

なし なし

リクエストパラメーター

パラメーター

型

必須 / 任意

説明

例

RegionId

string

任意

リージョンの ID。 DescribeRegions API を呼び出すと、最新のリージョンリストを取得できます。

RouteTableId

string

必須

ルートテーブルの ID。

DestinationCidrBlock

string

必須

送信先 CIDR ブロック。値は有効な CIDR ブロックである必要があります。デフォルトルートを作成するには、値を 0.0.0.0/0 に設定します。

NextHopId

string

任意

ネクストホップの ID。

注: NextHopId と NextHopList のいずれか一方のみを指定してください。

ClientToken

string

任意

リクエストのべき等性を保証するための一意で、大文字と小文字を区別する識別子。 トークンの長さは 1~64 ASCII 文字である必要があります。

NextHopType

string

任意

ネクストホップのタイプ。 有効値:

  • Instance: ECS インスタンス。
  • HaVip: 高可用性仮想 IP アドレス。
  • RouterInterface: ルーターインターフェイス。
  • NetworkInterface: 弾性ネットワークインターフェイス。
  • VpnGateway: VPN ゲートウェイ。
  • Ipv6Gateway: IPv6 ゲートウェイ。
  • NatGateway: NAT ゲートウェイ。

注:このパラメーターは、NextHopId を指定する場合に必須です。

NextHopList

array<object>

任意

ECMP ルートのネクストホップのリスト。

注: NextHopId と NextHopList のいずれか一方のみを指定してください。

object

任意

ECMP ルートのネクストホップ。

NextHopId

string

任意

ECMP ルートのネクストホップの ID。

NextHopType

string

任意

ECMP ルートのネクストホップのタイプ。 有効値:

  • Instance: ECS インスタンス。
  • HaVip: 高可用性仮想 IP アドレス。
  • RouterInterface: ルーターインターフェイス。
  • NetworkInterface: 弾性ネットワークインターフェイス。
  • VpnGateway: VPN ゲートウェイ。
  • Ipv6Gateway: IPv6 ゲートウェイ。
  • NatGateway: NAT ゲートウェイ。

レスポンスフィールド

フィールド

型

説明

例

object

レスポンスデータ。

RequestId

string

リクエスト ID。

例

成功レスポンス

JSONJSON

{
  "RequestId": ""
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 MissingParameter Miss mandatory parameter.
400 InvalidCidrBlock.Malformed Specified CIDR block is not valid.
400 InvalidCIDRBlock.Duplicate Specified CIDR block is already exists.
400 IncorrectVpcStatus Current VPC status does not support this operation.
400 QuotaExceeded Route entry quota exceeded in this route table.
400 IncorrectRouteEntryStatus Some route entry status blocked this operation.
400 InvalidCidrBlock Specified CIDR block is not valid.
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.
400 InvalidNexthopTypeAndList.BothNotNull both nexthopType and nextHopList are not null.
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.
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.
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.
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.
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.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。