getRouteList

Prev Next

VPC 환경에서 이용 가능합니다.

라우트 테이블에 설정된 라우트 목록을 조회합니다.

구문

getRouteList 구문은 다음과 같습니다.

./ncloud vpc getRouteList \
    --vpcNo <vpc-no> \
    --routeTableNo <route-table-no> \
    [--regionCode <KR|KRS>] \
    [--output <json|xml>]

옵션

getRouteList 실행 시 지정할 수 있는 옵션을 설명합니다.

필수 옵션

getRouteList의 필수 옵션입니다.

옵션 타입 필수 여부 설명
--vpcNo String Required VPC 번호
--routeTableNo String Required 라우트 테이블 번호

공통 옵션

vpc 명령에서 공통으로 사용하는 옵션에 대한 정보는 VPC 옵션을 참조해 주십시오.

예시

라우트 목록 조회 요청이 성공하면 각 라우트의 구성 정보가 반환됩니다.

명령

명령 예시는 다음과 같습니다.

./ncloud vpc getRouteList \
    --vpcNo 12345678 \
    --routeTableNo 45678901 \
    --regionCode KR \
    --output json

출력

출력 예시는 다음과 같습니다.

{
  "getRouteListResponse": {
    "totalRows": 3,
    "routeList": [
      {
        "destinationCidrBlock": "0.0.0.0/0",
        "targetName": "INTERNET GATEWAY",
        "routeTableNo": "45678901",
        "targetType": {
          "code": "IGW",
          "codeName": "Internet Gateway"
        },
        "targetNo": "",
        "isDefault": false
      },
      {
        "destinationCidrBlock": "192.168.0.0/16",
        "targetName": "LOCAL",
        "routeTableNo": "45678901",
        "targetType": {
          "code": "LOCAL",
          "codeName": "Local"
        },
        "targetNo": "",
        "isDefault": true
      },
      {
        "destinationCidrBlock": "192.168.4.0/24",
        "targetName": "test-natgw-01",
        "routeTableNo": "45678901",
        "targetType": {
          "code": "NATGW",
          "codeName": "NAT Gateway"
        },
        "targetNo": "56789012",
        "isDefault": false
      }
    ],
    "requestId": "4fe51b69-a6eb-4f15-944e-da99b08e0901",
    "returnCode": "0",
    "returnMessage": "success"
  }
}