getSubnetList

Prev Next

Available in VPC

Summary

Searches the list of subnets.

Requests

Request parameters

Parameter Name Requirement status Type Restrictions Description
regionCode No String - Region code
You can decide the region to get the subnet list from
Region code can be obtained through the getRegionList action
Default: selects the first region of the getRegionList search results
subnetNoList.N No List<String> - List of the subnet numbers
You can search by filtering with a subnet number
Subnet No. can be obtained through the getSubnetList action
ex) --subnetNoList 1234 2345
subnetName No String - Subnet name
You can search by filtering with a subnet name
subnet No String - Subnet IP address range
You can search by filtering with a subnet IP address range
ex) --subnet 10.0.0.0/24
subnetTypeCode No String - Subnet type code
You can search by filtering with a subnet type code
Options: PUBLIC
usageTypeCode No String - Purpose type code
You can search by filtering with a purpose type code
Options: GEN (general)
networkAclNo No String - Network ACL number
You can search by filtering with Network ACL number applied to the subnet
networkAcl No. can be obtained through the getNetworkAclList action
pageNo No Integer - Page number of the paged results
The results can be paged using page No. and page size
pageSize Conditional Integer - Size of each page to be displayed when paging
The results can be paged using page No. and page size
Entering the information is when page No. is entered
subnetStatusCode No String - Subnet status code
You can search by filtering with a subnet status code
Options: INIT
vpcNo No String -VPC No.
You can search by filtering with a VPC number
VPC No. can be obtained through the getVpcList action
zoneCode No String - Zone code
You can decide the zone to get the subnet list from
Zone code can be obtained through the getZoneList action
responseFormatType No String - Format type of the response result
Options: xml | json
Default: xml

Response

Response data type

  • Subnet list type
SubnetList extends CommonResponse
private Integer totalRows;
private List subnetList = new ArrayList<>();
Subnet
private String subnetNo;
private String vpcNo;
private String zoneCode;
private String subnetName;
private String subnet;
private CommonCode subnetStatus;
private Date createDate;
private CommonCode subnetType;
private CommonCode usageType;
private String networkAclNo;

Examples

Request examples

ncloud vpc getSubnetList --regionCode KR --subnetNoList ***43 --subnetName test-*** --subnet ***.***.1.0 --subnetTypeCode PUBLIC --usageTypeCode GEN --networkAclNo ***31 --subnetStatusCode RUN --vpcNo ***04 --zoneCode KR-1

Response examples

<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>