--- title: "addRouteTableSubnet" slug: "cli-vpc-routetable-addroutetablesubnet" updated: 2026-10-08T09:55:20Z published: 2026-10-08T09:55:20Z canonical: "cli.ncloud-docs.com/cli-vpc-routetable-addroutetablesubnet" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # addRouteTableSubnet VPC環境で利用できます。 ルーティングテーブルに関連付ける Subnetリストを追加します。 ## 構文 `addRouteTableSubnet`構文は次の通りです。 ``` ./ncloud vpc addRouteTableSubnet \ --vpcNo \ --routeTableNo \ --subnetNoList \ [--regionCode ] \ [--output ] ``` ## オプション `addRouteTableSubnet`の実行時に指定できるオプションについて説明します。 ### 必須オプション `addRouteTableSubnet`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--vpcNo` | String | Required | VPC番号 - [getVpcList](/docs/ja/cli-vpc-vpcmanagement-getvpclist)を参照 | | `--routeTableNo` | String | Required | ルーティングテーブル番号 - [getRouteTableList](/docs/ja/cli-vpc-routetable-getroutetablelist)を参照 | | `--subnetNoList` | List | Required | Subnet番号リスト - スペースで区切って複数入力可能 (例: `--subnetNoList 1234 2345`) - [getSubnetList](/docs/ja/cli-vpc-subnetmanagement-getsubnetlist)を参照 | ### 共通オプション `vpc`コマンドで共通して使用するオプションについては、[VPCのオプション](/docs/ja/cli-vpc#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 関連付けられている Subnetの追加リクエストが成功すると、各 Subnetの構成情報が返されます。 ### コマンド コマンドの例は次の通りです。 ``` ./ncloud vpc addRouteTableSubnet \ --vpcNo 12345678 \ --routeTableNo 45678901 \ --subnetNoList 23456789 23456790 \ --regionCode KR \ --output json ``` ### 出力 出力の例は次の通りです。 ``` { "addRouteTableSubnetResponse": { "totalRows": 2, "subnetList": [ { "subnetNo": "23456790", "vpcNo": "12345678", "zoneCode": "KR-1", "subnetName": "test-subnet-02", "subnet": "10.0.4.0/24", "subnetStatus": { "code": "RUN", "codeName": "実行中" }, "subnetType": { "code": "PUBLIC", "codeName": "Public" } }, { "subnetNo": "23456789", "vpcNo": "12345678", "zoneCode": "KR-1", "subnetName": "test-subnet-01", "subnet": "10.0.1.0/24", "subnetStatus": { "code": "RUN", "codeName": "実行中" }, "subnetType": { "code": "PUBLIC", "codeName": "Public" } } ], "requestId": "c9d0e1f2-a3b4-5678-cdef-901234567890", "returnCode": "0", "returnMessage": "success" } } ```