MENU
      createSubnet

        createSubnet


        기사 요약

        VPC 환경에서 이용 가능합니다.

        개요

        Subnet을 생성합니다.

        요청

        요청 파라미터

        파라미터명필수 여부타입제약 사항설명
        regionCodeNoString- 리전 코드
        Subnet이 생성될 리전(Region) 결정 가능
        regionCode는 getRegionList 액션을 통해 획득 가능
        Default: getRegionList 조회 결과의 첫 번째 리전을 선택
        zoneCodeYesString- ZONE 코드
        Subnet이 생성될 존(zone) 결정
        zoneCode는 getZoneList 액션을 통해 획득 가능
        vpcNoYesString- VPC 번호
        Subnet이 생성될 VPC 결정
        vpcNo는 getVpcList 액션을 통해 획득 가능
        subnetNameNoStringMin: 3, Max: 30
        소문자, 숫자, "-"의 특수문자만 허용하며 알파벳 문자로 시작해야 함
        영어 또는 숫자로 끝나야 함
        - 생성할 Subnet 이름
        Default: NAVER Cloud Platform이 자동으로 부여함
        subnetYesStringVPC 주소 범위 이하
        private 대역(10.0.0.0/8,172.16.0.0/12,192.168.0.0/16) 내에서 /16~/28 범위여야 함
        Subnet IP 주소 범위
        networkAclNoYesString- Network ACL 번호
        networkAclNo는 getNetworkAclList 액션을 통해 획득 가능
        subnetTypeCodeYesString- Subnet 유형 코드
        Options: PUBLIC (Internet Gateway 전용 Y) | PRIVATE (Internet Gateway 전용 N)
        usageTypeCodeNoString- 용도 유형 코드
        Options: GEN (일반) | LOADB (로드밸런서전용) | BM (베어메탈전용) | NATGW (NAT Gateway 전용)
        responseFormatTypeNoString- 응답 결과의 포맷 타입
        Options: xml | json
        Default: xml

        응답

        응답 데이터 타입

        • SubnetList 타입
        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;

        예시

        요청 예시

        ncloud vpc createSubnet --regionCode KR --zoneCode KR-1 --vpcNo ***04 --subnetName test-*** --subnet ***.***.1.0/24 --networkAclNo ***31 --subnetTypeCode PUBLIC --usageTypeCode GEN
        Plain text

        응답 예시

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

        이 문서가 도움이 되었습니까?

        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.