VPC環境で利用できます。
ユーザーが指定した条件に基づいてルーティングテーブルリストを照会します。
構文
getRouteTableList構文は次の通りです。
./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>]
オプション
getRouteTableListの実行時に指定できるオプションについて説明します。
必須オプション
getRouteTableListの必須オプションです。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--pageSize |
Integer | Conditional | ページごとに表示する結果数
|
任意オプション
getRouteTableListの任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--vpcNo |
String | Optional | VPC番号
|
--routeTableNoList |
List | Optional | ルーティングテーブル番号リスト
|
--routeTableName |
String | Optional | ルーティングテーブル名 |
--supportedSubnetTypeCode |
String | Optional | サブネットタイプ
|
--sortedBy |
String | Optional | ソート基準
|
--sortingOrder |
String | Optional | sortedBy利用時のソート順
|
--pageNo |
Integer | Optional | ページングされた結果のページ番号
|
共通オプション
vpcコマンドで共通して使用するオプションについては、VPCのオプションをご参照ください。
例
ルーティングテーブルリストの照会リクエストが成功すると、各ルーティングテーブルの構成情報が返されます。
コマンド
コマンドの例は次の通りです。
./ncloud vpc getRouteTableList \
--vpcNo 12345678 \
--routeTableNoList 45678901 45678902 \
--supportedSubnetTypeCode PUBLIC \
--sortedBy routeTableName \
--sortingOrder ASC \
--pageNo 1 \
--pageSize 10 \
--regionCode KR \
--output json
出力
出力の例は次の通りです。
{
"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": "実行中"
},
"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": "実行中"
},
"routeTableDescription": "VPC [test-vpc-01] default Route Table for public Subnet"
}
],
"requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"returnCode": "0",
"returnMessage": "success"
}
}