removeRoute

Prev Next

Available in VPC

Remove the route list set in a route table. Default routes can't be removed.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET, POST /removeRoute

Request headers

For information about the headers common to all VPC APIs, see VPC common headers.

Request query parameters

The following describes the parameters.

Field Type Required Description
regionCode String Optional Region code of the route table from which you want to remove the route
  • First Region of the query result (default)
  • Check through getRegionList.
  • vpcNo String Required VPC number of the route table
  • Check through getVpcList.
  • routeList.N.destinationCidrBlock String Required Destination IPv4 address range of the route to remove
  • Use CIDR notation.
  • Example: routeList.1.destinationCidrBlock=0.0.0.0/0&routeList.2.destinationCidrBlock=100.10.20.0/24
  • routeList.N.targetTypeCode String Required Destination type of the route to remove
    • NATGW | VPCPEERING | VGW
      • NATGW: NAT Gateway
      • VPCPEERING: VPC peering
      • VGW: virtual private gateway
      • Example: routeList.1.targetTypeCode=NATGW&routeList.2.targetTypeCode=VPCPEERING
    routeList.N.targetNo String Required Destination identification number of the route to delete
  • Check via API to query the list of resources for each destination type.
  • Example: routeList.1.targetNo=1234&routeList.2.targetNo=2345
  • routeList.N.targetName String Required Destination name of the route to delete
  • Check via API to query the list of resources for each destination type.
  • Example: routeList.1.targetName=test-natgateway&routeList.2.targetName=test-peering
  • responseFormatType String Optional

    Request example

    The request example is as follows:

    curl --location 'https://ncloud.apigw.ntruss.com/vpc/v2/removeRoute
    ?regionCode=KR
    &vpcNo=***04
    &routeTableNo=***38
    &routeList.1.destinationCidrBlock=***.***.200.0/24
    &routeList.1.targetTypeCode=NATGW
    &routeList.1.targetNo=***9734
    &routeList.1.targetName=test-***'
    --header 'x-ncp-iam-access-key: {Timestamp}'    
    --header 'x-ncp-iam-access-key: {Access Key}' 
    --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
    

    Response

    This section describes the response format.

    Response body

    See RouteList for the response body.

    Response status codes

    For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

    Response example

    The response example is as follows:

    <removeRouteResponse>
      <requestId>fb1ea6cf-15bf-4600-b737-1d7bed33421e</requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>2</totalRows>
      <routeList>
        <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>
    </removeRouteResponse>