addRouteTableSubnet

Prev Next

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

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

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
GET | POST /vpc/v2/addRouteTableSubnet
참고

가이드는 GET 방식 기준으로 안내합니다. POST 방식의 호출 테스트는 네이버 클라우드 플랫폼 콘솔의 API Gateway 서비스에서 Swagger를 통해서 가능합니다.

요청 헤더

VPC API에서 공통으로 사용하는 헤더에 대한 정보는 VPC 공통 헤더를 참조해 주십시오.

요청 쿼리 파라미터

요청 쿼리 파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
regionCode String Optional 연관 Subnet 리스트를 추가하려는 라우트 테이블의 리전 코드
  • 조회 결과의 첫 번째 리전(기본값)
  • getRegionList 참조
vpcNo String Required 연관 Subnet 리스트를 추가하려는 라우트 테이블의 VPC 번호
routeTableNo String Required 연관 Subnet 리스트를 추가하려는 라우트 테이블의 번호
subnetNoList.N List[String] Required 추가하려는 연관 Subnet 번호 목록
  • subnetNogetSubnetList 참조
  • <예시> subnetNoList.1=1234&subnetNoList.2=2345
responseFormatType String Optional 응답 결과의 형식
  • xml (기본값) | json

요청 예시

요청 예시는 다음과 같습니다.

curl --location 'https://ncloud.apigw.gov-ntruss.com/vpc/v2/addRouteTableSubnet
?regionCode=KR
&vpcNo=***04
&routeTableNo=***38
&subnetNoList.1=***45' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디는 SubnetList를 참조해 주십시오.

응답 상태 코드

VPC API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 VPC API 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

<addRouteTableSubnetResponse>
  <requestId>d8559867-f266-4782-8bf4-d99bd318336e</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>2</totalRows>
  <subnetList>
    <subnet>
      <subnetNo>***44</subnetNo>
      <vpcNo>***04</vpcNo>
      <zoneCode>KR-1</zoneCode>
      <subnetName>test-***</subnetName>
      <subnet>***.***.1.0/24</subnet>
      <subnetStatus>
        <code>RUN</code>
        <codeName>run</codeName>
      </subnetStatus>
      <subnetType>
        <code>PUBLIC</code>
        <codeName>Public</codeName>
      </subnetType>
    </subnet>
    <subnet>
      <subnetNo>***45</subnetNo>
      <vpcNo>***04</vpcNo>
      <zoneCode>KR-1</zoneCode>
      <subnetName>test-***</subnetName>
      <subnet>***.***.2.0/24</subnet>
      <subnetStatus>
        <code>INIT</code>
        <codeName>init</codeName>
      </subnetStatus>
      <subnetType>
        <code>PUBLIC</code>
        <codeName>Public</codeName>
      </subnetType>
    </subnet>
  </subnetList>
</addRouteTableSubnetResponse>