Available in VPC
Create a route table according to the user-defined conditions.
Syntax
The createRouteTable syntax is as follows:
./ncloud vpc createRouteTable \
--vpcNo <vpc-no> \
--supportedSubnetTypeCode <PUBLIC|PRIVATE> \
[--routeTableName <route-table-name>] \
[--routeTableDescription <route-table-description>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running createRouteTable.
Required options
The following options are required for createRouteTable.
| Options | Type | Required | Description |
|---|---|---|---|
--vpcNo |
String | Required | VPC number
|
--supportedSubnetTypeCode |
String | Required | Subnet type
|
Optional options
These are the optional options for createRouteTable. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--routeTableName |
String | Optional | Route table name
|
--routeTableDescription |
String | Optional | Description of the route table (byte)
|
Common options
For information about the options common to all vpc subcommands, see VPC options.
Examples
If the request to create a route table is successful, the route table's configuration information and creation status are returned.
Command
The command example is as follows:
./ncloud vpc createRouteTable \
--vpcNo 12345678 \
--supportedSubnetTypeCode PUBLIC \
--routeTableName test-route-table \
--routeTableDescription "Test route table" \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"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": "In operation"
},
"routeTableDescription": "Test route table"
}
],
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"returnCode": "0",
"returnMessage": "success"
}
}