createSubnet
- Print
- PDF
createSubnet
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Available in VPC
Overview
Creates a subnet.
Requests
Request parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
regionCode | No | String | - Region code Can decide the Region in which the subnet will be created. regionCode can be obtained via the getRegionList action. Default: selects the first Region of the getRegionList query results | |
zoneCode | Yes | String | - Zone code Determines the zone in which a subnet will be created. zoneCode can be obtained via the getZoneListaction. | |
vpcNo | Yes | String | - VPC number Determines the VPC in which the subnet will be created vpcNo can be obtained via the getVpcListaction. | |
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 number. | - The name of subnet to be created Default: automatically granted by NAVER Cloud Platform |
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 networkAclNo can be obtained via the getNetworkAclListaction. | |
subnetTypeCode | Yes | String | - Subnet type code Options: PUBLIC (Y dedicated for Internet Gateway) | PRIVATE (N dedicated for Internet Gateway) | |
usageTypeCode | No | String | - Usage type code Options: GEN (general) | LOADB (load balancer only) | BM (bare metal only) | NATGW (NAT Gateway only) | |
responseFormatType | No | String | - Format type of the response result Options : xml | json Default : xml |
Responses
Response bodies
Examples
Request examples
GET {API_URL}/vpc/v2/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>
Was this article helpful?