VPC環境で利用できます。
ルーティングテーブルに関連付ける Subnetリストを追加します。
構文
addRouteTableSubnet構文は次の通りです。
./ncloud vpc addRouteTableSubnet \
--vpcNo <vpc-no> \
--routeTableNo <route-table-no> \
--subnetNoList <subnet-no-list> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
オプション
addRouteTableSubnetの実行時に指定できるオプションについて説明します。
必須オプション
addRouteTableSubnetの必須オプションです。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--vpcNo |
String | Required | VPC番号
|
--routeTableNo |
String | Required | ルーティングテーブル番号 |
--subnetNoList |
List | Required | Subnet番号リスト
|
共通オプション
vpcコマンドで共通して使用するオプションについては、VPCのオプションをご参照ください。
例
関連付けられている 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"
}
}