getSubnetList
    • PDF

    getSubnetList

    • PDF

    Article summary

    Available in VPC

    View the list of subnets based on the conditions the user specifies.

    Request

    The following describes the request format for the endpoint. The request format is as follows:

    MethodURI
    GET, POST/getSubnetList

    Request headers

    For headers common to all VPC APIs, see VPC common headers.

    Request query parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    regionCodeStringOptionalRegion code whose subnet list you want to view
  • First Region of the search result (default)
  • Check through getRegionList
  • subnetNoList.NList<String>OptionalView the list with the subnet number
  • subnetNo can be obtained through getSubnetList
  • <E.g.> subnetNoList.1=1234&subnetNoList.2=2345
  • subnetNameStringOptionalView the list with the subnet name
    subnetStringOptionalView the list with the subnet IP address range
  • <E.g.> subnet=10.0.0.0/24
  • subnetTypeCodeStringOptionalView the list with the subnet type code
    • PUBLIC | PRIVATE
    usageTypeCodeStringOptionalView the subnet list with the subnet purpose type code
    • GEN| LOADB | BM | NATGW
      • GEN: general
      • LOADB: load balancer only
      • BM: bare metal only
      • NATGW: NAT Gateway only
    networkAclNoStringOptionalView the subnet list with the network ACL number applied to the subnet
  • networkAclNo can be obtained through getNetworkAclList
  • pageNoIntegerOptionalPage number of the paged results
    • Page the result values using pageNo and pageSize
    pageSizeIntegerConditional
    subnetStatusCodeStringOptionalView the subnet list with the subnet status code
    • INIT | CREATING | RUN | TERMTING
    vpcNoStringOptionalView the subnet list with the VPC number
    zoneCodeStringOptionalView the subnet list with the zone code
    responseFormatTypeStringOptionalResponse result format
    • xml (default) | json

    Request example

    The following is a sample request.

    curl --location 'https://ncloud.apigw.ntruss.com/vpc/v2/getSubnetList
    ?regionCode=KR
    &subnetNoList.1=***43
    &subnetName=test-***
    &subnet=***.***.1.0
    &subnetTypeCode=PUBLIC
    &usageTypeCode=GEN
    &networkAclNo=***31
    &subnetStatusCode=RUN
    &vpcNo=***04
    &zoneCode=KR-1' 
    --header 'x-ncp-apigw-timestamp: {Timestamp}' 
    --header 'x-ncp-iam-access-key: {Sub Account Access Key}' 
    --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
    

    Response

    The following describes the response format.

    Response body

    See SubnetList 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 following is a sample response.

    <getSubnetListResponse>
      <requestId>4a7ca579-1b43-439b-97f7-c423a37bc3d9</requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>1</totalRows>
      <subnetList>
        <subnet>
          <subnetNo>***43</subnetNo>
          <vpcNo>***04</vpcNo>
          <zoneCode>KR-1</zoneCode>
          <subnetName>test-***</subnetName>
          <subnet>***.***.1.0/24</subnet>
          <subnetStatus>
            <code>RUN</code>
            <codeName>run</codeName>
          </subnetStatus>
          <createDate>2020-05-04T11:49:52+0900</createDate>
          <subnetType>
            <code>PUBLIC</code>
            <codeName>Public</codeName>
          </subnetType>
          <usageType>
            <code>GEN</code>
            <codeName>General</codeName>
          </usageType>
          <networkAclNo>***31</networkAclNo>
        </subnet>
      </subnetList>
    </getSubnetListResponse>
    

    Was this article helpful?

    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.