MENU
      addRoute

        addRoute


        기사 요약

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

        개요

        라우트 테이블에 라우트 리스트를 추가합니다.

        요청

        요청 파라미터

        파라미터명필수 여부타입제약 사항설명
        regionCodeNoString- 리전 코드
        라우트가 추가될 라우트 테이블의 리전(Region) 결정 가능
        regionCode는 getRegionList 액션을 통해 획득 가능
        Default : getRegionList 조회 결과의 첫 번째 리전을 선택
        vpcNoYesString- VPC 번호
        라우트가 추가될 라우트 테이블의 VPC를 결정함
        vpcNo는 getVpcList 액션을 통해 획득 가능
        routeTableNoYesString- 라우트 테이블 번호
        라우트가 추가될 라우트 테이블 번호를 결정함
        routeTableNo는 getRouteTableList 액션을 통해 획득 가능
        routeList.N.destinationCidrBlockYesString- 목적지 IPv4 CIDR 블록
        추가할 라우트의 목적지 IP 주소 범위를 지정함
        routeList.N.targetTypeCodeYesString- 목적지 유형 코드
        추가할 라우트의 목적지 유형을 결정함
        Options : NATGW (NAT Gateway) | VPCPEERING (VPC Peering) | VGW (Virtual Private Gateway)
        routeList.N.targetNoYesString- 목적지 식별 번호
        목적지 유형에 해당하는 목적지 식별 번호를 결정함
        targetNo는 각 목적지 유형에 해당하는 조회 액션을 통해 획득 가능
        routeList.N.targetNameYesString- 목적지 이름
        목적지 유형에 해당하는 목적지 이름을 입력함
        targetName은 각 목적지 유형에 해당하는 조회 액션을 통해 획득 가능
        responseFormatTypeNoString- 응답 결과의 포맷 타입
        Options : xml | json
        Default : xml

        응답

        응답 데이터 타입

        • routeList 타입
        RouteList extends CommonResponse
        private Integer totalRows;
        private List routeList = new ArrayList<>();
        Route
        private String routeTableNo;
        private String destinationCidrBlock;
        private String targetName;
        private CommonCode targetType;
        private String targetNo;
        private Boolean isDefault;

        예시

        요청 예시

        ncloud vpc addRoute --regionCode KR --vpcNo ***04 --routeTableNo ***38 --routeList "destinationCidrBlock='***.***.200.0/24', targetTypeCode='NATGW', targetNo='***9734', targetName='test-***'" "destinationCidrBlock='***.***.201.0/24', targetTypeCode='VGW', targetNo='***9735', targetName='test-***'"
        Plain text

        응답 예시

        요청 수행 후 해당 라우트 테이블의 라우트 리스트

        <addRouteResponse>
          <requestId>2b97f2f0-39fc-40f0-9a8d-3eb6d40506e3</requestId>
          <returnCode>0</returnCode>
          <returnMessage>success</returnMessage>
          <totalRows>3</totalRows>
          <routeList>
            <route>
              <destinationCidrBlock>***.***.200.0/24</destinationCidrBlock>
              <targetName>test-***</targetName>
              <routeTableNo>***38</routeTableNo>
              <targetType>
                <code>NATGW</code>
                <codeName>NAT Gateway</codeName>
              </targetType>
              <targetNo>***9734</targetNo>
              <isDefault>false</isDefault>
            </route>
            <route>
              <destinationCidrBlock>***.***.0.0/16</destinationCidrBlock>
              <targetName>LOCAL</targetName>
              <routeTableNo>***38</routeTableNo>
              <targetType>
                <code>LOCAL</code>
                <codeName>Local</codeName>
              </targetType>
              <targetNo></targetNo>
              <isDefault>true</isDefault>
            </route>
            <route>
              <destinationCidrBlock>***.***.0.0/0</destinationCidrBlock>
              <targetName>INTERNET GATEWAY</targetName>
              <routeTableNo>***38</routeTableNo>
              <targetType>
                <code>IGW</code>
                <codeName>Internet Gateway</codeName>
              </targetType>
              <targetNo></targetNo>
              <isDefault>true</isDefault>
            </route>
          </routeList>
        </addRouteResponse>
        XML

        이 문서가 도움이 되었습니까?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.