VPC環境で利用できます。
ユーザーが指定した条件に基づいてルーティングテーブルを作成します。
構文
createRouteTable構文は次の通りです。
./ncloud vpc createRouteTable \
--vpcNo <vpc-no> \
--supportedSubnetTypeCode <PUBLIC|PRIVATE> \
[--routeTableName <route-table-name>] \
[--routeTableDescription <route-table-description>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
オプション
createRouteTableの実行時に指定できるオプションについて説明します。
必須オプション
createRouteTableの必須オプションです。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--vpcNo |
String | Required | VPCの番号
|
--supportedSubnetTypeCode |
String | Required | サブネットタイプ
|
任意オプション
createRouteTableの任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--routeTableName |
String | Optional | ルーティングテーブルの名前
|
--routeTableDescription |
String | Optional | ルーティングテーブルの説明 (Byte)
|
共通オプション
vpcコマンドで共通して使用するオプションについては、VPCのオプションをご参照ください。
例
ルーティングテーブルの作成リクエストが成功すると、ルーティングテーブルの構成情報と作成状態が返されます。
コマンド
コマンドの例は次の通りです。
./ncloud vpc createRouteTable \
--vpcNo 12345678 \
--supportedSubnetTypeCode PUBLIC \
--routeTableName test-route-table \
--routeTableDescription "Test route table" \
--regionCode KR \
--output json
出力
出力の例は次の通りです。
{
"createRouteTableResponse": {
"totalRows": 1,
"routeTableList": [
{
"routeTableNo": "45678901",
"routeTableName": "test-route-table",
"regionCode": "KR",
"vpcNo": "12345678",
"supportedSubnetType": {
"code": "PUBLIC",
"codeName": "Public"
},
"isDefault": false,
"routeTableStatus": {
"code": "RUN",
"codeName": "実行中"
},
"routeTableDescription": "Test route table"
}
],
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"returnCode": "0",
"returnMessage": "success"
}
}