createSubnet
    • PDF

    createSubnet

    • PDF

    Article summary

    Available in VPC

    Summary

    Create a subnet.

    Requests

    Request parameters

    Parameter NameRequirement statusTypeRestrictionsDescription
    regionCodeNoString- 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
    zoneCodeYesString- Zone code
    Determine the zone in which a subnet will be created
    Zone code can be obtained through the getZoneList action
    vpcNoYesString-VPC No.
    Determine the VPC in which a subnet will be created
    VPC No. can be obtained through the getVpcList action
    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 a number.
    - The name of subnet to be created
    Default: NAVER Cloud Platform automatically assigns it
    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
    networkAcl No. can be obtained through the getNetworkAclList action
    subnetTypeCodeYesString- Subnet type code
    Options: PUBLIC (Y for Internet Gateway only)
    usageTypeCodeNoString- Purpose type code
    Options: GEN (general)
    responseFormatTypeNoString- 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 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.