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

Virtual Private Cloud:AssociateRouteTable

最終更新日:Apr 27, 2026

カスタムルートテーブルを、同一 VPC 内の vSwitch に関連付けます。

操作説明

AssociateRouteTable は非同期操作です。リクエストを送信すると、システムはリクエスト ID を返し、タスクをバックグラウンドで実行します。タスクのステータスは、DescribeVSwitchAttributes 操作を呼び出して確認できます。

  • vSwitch のステータスが Pending の場合、ルートテーブルが vSwitch に関連付けられています。

  • vSwitch のステータスが Available の場合、ルートテーブルが vSwitch に関連付け済みです。

今すぐお試しください

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

テスト

RAM 認証

この操作の認証情報はありません。問題が発生した場合は、アカウントマネージャーにご連絡ください。

リクエストパラメーター

パラメーター

必須 / 任意

説明

RegionId

string

必須

ルートテーブルが属する VPC のリージョン ID です。

最新のリージョンリストは、DescribeRegions 操作を呼び出して確認できます。

cn-hangzhou

RouteTableId

string

必須

ルートテーブルの ID です。

vtb-bp145q7glnuzdvzu2****

VSwitchId

string

必須

vSwitch の ID です。

vsw-25ncdvfaue4****

ClientToken

string

任意

リクエストのべき等性を保証するために使用されるクライアントトークンです。

クライアント側でトークンを生成できますが、異なるリクエスト間で一意であることを保証する必要があります。トークンには ASCII 文字のみを使用できます。

説明

このパラメーターを指定しない場合、システムは自動的に リクエスト IDクライアントトークン として使用します。リクエスト ID は各リクエストごとに異なる可能性があります。

02fb3da4-130e-11e9-8e44-0016e04115b

RegionId

string

必須

ルートテーブルが属する VPC のリージョン ID です。

最新のリージョンリストは、DescribeRegions 操作を呼び出して確認できます。

cn-hangzhou

レスポンスフィールド

フィールド

説明

object

RequestId

string

リクエスト ID です。

DC668356-BCB4-42FD-9BC3-FA2B2E04B634

成功レスポンス

JSONJSON

{
  "RequestId": "DC668356-BCB4-42FD-9BC3-FA2B2E04B634"
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 OperationDenied.CloudBoxVbrEntryExist The operation is not allowed because the routing table has a route entry for the next hop to the cloud box VBR.
400 OperationDenied.OtherCloudBoxVbrEntryExist The operation is not allowed because the routing table has a route entry for the next hop that points to a VBR other than this cloud box.
400 ResourceAlreadyAssociated.RouteTable The resource has already associated with a routetable.
400 OperationDenied.AssociateGatewayRouteTable The operation is not allowed because gateway route tables cannot be bound to a vSwitch.
400 OperationDenied.SwitchToSystemRouteTable The associated route tables cannot be directly changed to system route tables.
400 ResourceNotFound.VSwitch The specified resource of VSwitch is not found.
400 InvalidRouteTableId.NotFound Specified route table does not exist.
400 OperationDenied.LocalRouteEntryModified The next hop of a local route is modified.
400 MissingParam.VSwitchId The parameter VSwitchId is missing.
400 InvalidRegionId.NotFound Specified value of RegionId is not supported.
400 InvalidParameter.Action This vpc feature is not supported in this region
400 IncorrectVSwitchStatus The current status of the virtual switch does not support this operation.
400 Forbidden.VSwitchAlreadyAssociatedRouteTable The specified virtual switch already associates route table.
400 Forbidden.NotInSameVpc The specified virtual switch and route table are not in the same VPC.
400 IncorrectStatus.RouteTable The status of the specified route table is incorrect.
404 InvalidRouteTableId.NotFound Specified route table does not exist.
404 InvalidVSwitchId.NotFound Specified VSwitch does not exist.

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

変更履歴

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