Available in VPC
Get the list of route tables based on the conditions the user specifies.
Syntax
The getRouteTableList syntax is as follows:
./ncloud vpc getRouteTableList \
[--vpcNo <vpc-no>] \
[--routeTableNoList <route-table-no-list>] \
[--routeTableName <route-table-name>] \
[--supportedSubnetTypeCode <PUBLIC|PRIVATE>] \
[--sortedBy <routeTableName>] \
[--sortingOrder <ASC|DESC>] \
[--pageNo <page-no>] \
[--pageSize <page-size>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running getRouteTableList.
Required options
The following options are required for getRouteTableList.
| Options | Type | Required | Description |
|---|---|---|---|
--pageSize |
Integer | Conditional | Results to display per page
|
Optional options
These are the optional options for getRouteTableList. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--vpcNo |
String | Optional | VPC number
|
--routeTableNoList |
List | Optional | Route table number list
|
--routeTableName |
String | Optional | Route table name |
--supportedSubnetTypeCode |
String | Optional | Subnet type
|
--sortedBy |
String | Optional | Sort by
|
--sortingOrder |
String | Optional | Sort order when using sortedBy
|
--pageNo |
Integer | Optional | Page numbers in paged results
|
Common options
For information about the options common to all vpc subcommands, see VPC options.
Examples
If the request to retrieve the list of route tables is successful, the configuration information for each route table is returned.
Command
The command example is as follows:
./ncloud vpc getRouteTableList \
--vpcNo 12345678 \
--routeTableNoList 45678901 45678902 \
--supportedSubnetTypeCode PUBLIC \
--sortedBy routeTableName \
--sortingOrder ASC \
--pageNo 1 \
--pageSize 10 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"getRouteTableListResponse": {
"totalRows": 2,
"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": "Updated route table description"
},
{
"routeTableNo": "45678902",
"routeTableName": "test-vpc-01-default-public-table",
"regionCode": "KR",
"vpcNo": "12345678",
"supportedSubnetType": {
"code": "PUBLIC",
"codeName": "Public"
},
"isDefault": true,
"routeTableStatus": {
"code": "RUN",
"codeName": "In operation"
},
"routeTableDescription": "VPC [test-vpc-01] default Route Table for public Subnet"
}
],
"requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"returnCode": "0",
"returnMessage": "success"
}
}