createSubnet
    • PDF

    createSubnet

    • PDF

    Article Summary

    Available in VPC

    Overview

    Creates a subnet.

    Requests

    Request parameters

    Parameter nameRequirement statusTypeRestrictionsDescription
    regionCodeNoString- 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
    zoneCodeYesString- Zone code
    Determines the zone in which a subnet will be created.
    zoneCode can be obtained via the getZoneListaction.
    vpcNoYesString- VPC number
    Determines the VPC in which the subnet will be created
    vpcNo can be obtained via the getVpcListaction.
    subnetNameNoStringMin : 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
    subnetYesStringBelow 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
    networkAclNoYesString- Network ACL number
    networkAclNo can be obtained via the getNetworkAclListaction.
    subnetTypeCodeYesString- Subnet type code
    Options: PUBLIC (Y dedicated for Internet Gateway) | PRIVATE (N dedicated for Internet Gateway)
    usageTypeCodeNoString- Usage type code
    Options: GEN (general) | LOADB (load balancer only) | BM (bare metal only) | NATGW (NAT Gateway only)
    responseFormatTypeNoString- 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?

    What's Next
    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.