Available in VPC
Summary
Create a subnet.
Requests
Request parameters
| Parameter Name | Requirement status | Type | Restrictions | Description | 
|---|---|---|---|---|
| regionCode | No | String | - Region code You can decide the region in which the subnet will be created Region code can be obtained through the getRegionList action Default: selects the first region of the getRegionList search results  | 
|
| zoneCode | Yes | String | - Zone code Determine the zone in which a subnet will be created Zone code can be obtained through the getZoneList action  | 
|
| vpcNo | Yes | String | -VPC No. Determine the VPC in which a subnet will be created VPC No. can be obtained through the getVpcList action  | 
|
| subnetName | No | String | Min: 3, Max: 30 Only lowercase English letters, numbers, and "-" are allowed, and it must start with an English letter. It must end with an English letter or a number.  | 
- The name of subnet to be created Default: NAVER Cloud Platform automatically assigns it  | 
| subnet | Yes | String | Below the VPC address range It must be in the range of /16 to /28 within the private bandwidth (10.0.0.0/8,172.16.0.0/12,192.168.0.0/16)  | 
Subnet IP address range | 
| networkAclNo | Yes | String | - Network ACL number networkAcl No. can be obtained through the getNetworkAclList action  | 
|
| subnetTypeCode | Yes | String | - Subnet type code Options: PUBLIC (Y for Internet Gateway only)  | 
|
| usageTypeCode | No | String | - Purpose type code Options: GEN (general)  | 
|
| 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 | 
| 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 createSubnet --regionCode KR --zoneCode KR-1 --vpcNo ***04 --subnetName test-*** --subnet ***.***.1.0/24 --networkAclNo ***31 --subnetTypeCode PUBLIC --usageTypeCode GEN
Response examples
<createSubnetResponse>
  <requestId>0f539b1b-10ef-43fa-a2c4-3670e601251b</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>CREATING</code>
        <codeName>creating</codeName>
      </subnetStatus>
      <createDate>2020-07-31T14:32:28+0900</createDate>
      <subnetType>
        <code>PUBLIC</code>
        <codeName>Public</codeName>
      </subnetType>
      <usageType>
        <code>GEN</code>
        <codeName>General</codeName>
      </usageType>
      <networkAclNo>***31</networkAclNo>
    </subnet>
  </subnetList>
</createSubnetResponse>