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クラウドプラットフォームが自動的に付与する
        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.